diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-08-03 01:41:24 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-08-08 00:21:29 +0900 |
| commit | 88b2ec6c34fb405cf468475e6f2a7754e2c705eb (patch) | |
| tree | 7daa7ee06c64f19aef9b02871808006998f92207 /tests/roots | |
| parent | 5aa774b97aaae5cb61ded869038fce75724d0fe6 (diff) | |
| download | sphinx-git-88b2ec6c34fb405cf468475e6f2a7754e2c705eb.tar.gz | |
Fix #8041: autodoc: An ivar on super class is not shown unexpectedly
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.
Diffstat (limited to 'tests/roots')
| -rw-r--r-- | tests/roots/test-ext-autodoc/target/typed_vars.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/roots/test-ext-autodoc/target/typed_vars.py b/tests/roots/test-ext-autodoc/target/typed_vars.py index 43c58deb0..ba9657f18 100644 --- a/tests/roots/test-ext-autodoc/target/typed_vars.py +++ b/tests/roots/test-ext-autodoc/target/typed_vars.py @@ -28,4 +28,4 @@ class Class: class Derived(Class): - pass + attr7: int |
