Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autodoc_type_aliases does not effect to variables and attributes #8434

Closed
tk0miya opened this issue Nov 15, 2020 · 0 comments
Closed

autodoc_type_aliases does not effect to variables and attributes #8434

tk0miya opened this issue Nov 15, 2020 · 0 comments

Comments

@tk0miya
Copy link
Member

tk0miya commented Nov 15, 2020

Describe the bug
autodoc_type_aliases does not effect to variables and attributes

To Reproduce

# example.py
from __future__ import annotations


#: blah blah blah
var: String


class MyString:
    "mystring"

    #: blah blah blah
    var: String
# index.rst
.. automodule:: example
   :members:
   :undoc-members:
# conf.py
autodoc_type_aliases = {
    'String': 'example.MyString'
}

Expected behavior
autodoc_type_aliases should be applied to example.var and example.MyString.var.

Your project
N/A

Screenshots
N/A

Environment info

  • OS: Mac
  • Python version: 3.9.0
  • Sphinx version: HEAD of 3.x branch
  • Sphinx extensions: sphinx.ext.autodoc
  • Extra tools: Nothing

Additional context
N/A

@tk0miya tk0miya added this to the 3.4.0 milestone Nov 15, 2020
tk0miya added a commit that referenced this issue Nov 17, 2020
…ariables

Fix #8434: autodoc_type_aliases does not effect to variables
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant