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

A typehint for the instance variable having type_comment on super class is not displayed #8067

Closed
tk0miya opened this issue Aug 7, 2020 · 1 comment

Comments

@tk0miya
Copy link
Member

tk0miya commented Aug 7, 2020

Describe the bug
A typehint for the instance variable having type_comment on super class is not displayed

To Reproduce

# example.py
class Foo:
    var1 = 0  # type: int


class Bar(Foo):
    var2: int
# index.rst
.. automodule:: example
   :members:
   :undoc-members:
   :inherited-members:

refs: https://github.com/sphinx-doc/sphinx/pull/8042/files#r467115083

Expected behavior
Bar.var1 is shown with type hints.

Your project
No

Screenshots
No

Environment info

  • OS: Mac
  • Python version: 3.8.2
  • Sphinx version: HEAD of 3.x
  • Sphinx extensions: sphinx.ext.autodoc
@tk0miya
Copy link
Member Author

tk0miya commented Dec 17, 2020

Fixed by #8542.

@tk0miya tk0miya closed this as completed Dec 17, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 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