mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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.
11 lines
253 B
Python
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
|