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

Fix #8041: autodoc: An ivar on super class is not shown unexpectedly #8042

Merged
merged 1 commit into from Aug 7, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Aug 2, 2020

Feature or Bugfix

  • Bugfix

Purpose

@tk0miya tk0miya added this to the 3.2.0 milestone Aug 2, 2020
@tk0miya tk0miya force-pushed the 8041_ivar_on_superclass_not_shown branch from 8822c4d to cfa0c91 Compare August 3, 2020 17:07
…xpectedly

An annotated instance variable on super class is not documented when
derived class has also other annotated instance variables because
`obj.__annotations__` is overrided by derived class's type hints.

To get annotations of the target class correctly, this scans MRO to
get all of annotated instance variables.
@tk0miya tk0miya force-pushed the 8041_ivar_on_superclass_not_shown branch from cfa0c91 to 88b2ec6 Compare August 7, 2020 15:21
'',
' .. py:attribute:: Derived.attr3',
' :module: target.typed_vars',
' :value: 0',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: type_comment in super class is still not supported.

@tk0miya tk0miya merged commit 697dff3 into sphinx-doc:3.x Aug 7, 2020
@tk0miya tk0miya deleted the 8041_ivar_on_superclass_not_shown branch August 7, 2020 15:51
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant