From 8822c4dc4c2ce10afbeaccd44ef8a35e8c923620 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 3 Aug 2020 01:41:24 +0900 Subject: [PATCH] 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. --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 11f063b3da3..9424e727dad 100644 --- a/CHANGES +++ b/CHANGES @@ -63,6 +63,8 @@ Bugs fixed when ``:inherited-members:`` option given * #8032: autodoc: A type hint for the instance variable defined at parent class is not shown in the document of the derived class +* #8041: autodoc: An annotated instance variable on super class is not + documented when derived class has other annotated instance variables * #7839: autosummary: cannot handle umlauts in function names * #7865: autosummary: Failed to extract summary line when abbreviations found * #7866: autosummary: Failed to extract correct summary line when docstring