Files
sphinx/tests/roots/test-ext-autodoc/target/instance_variable.py
Takeshi KOMIYA c0678a4a50 Fix #741: autodoc: inherited-members doesn't support instance attributes on super class
To support instance attributes on super class, get_class_members() scans
the instance attributes defined at super classes using ModuleAnalyzer.
It allows to generate document for them when users gives :
inherited-members: option.
2020-12-18 23:24:59 +09:00

11 lines
253 B
Python

class Foo:
def __init__(self):
self.attr1 = None #: docstring foo
self.attr2 = None #: docstring foo
class Bar(Foo):
def __init__(self):
self.attr2 = None #: docstring bar
self.attr3 = None #: docstring bar