sphinx/tests/roots/test-ext-autosummary/autosummary_dummy_inherited_module.py
Jens Hedegaard Nielsen 3edae68904
autosummary: Support documenting inherited attributes (#10691)
The current implementation of ``import_ivar_by_name`` filters
attributes if the name of the object that the attribute belongs to
does not match the object being documented. However, for inherited
attributes this is not the case. Filtering only on the attribute name
seems to resolve the issue. It is not clear to me if there are any
unwanted sideeffects of this and we should filter on the list of
qualnames for the object and all its super classes (if any).

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-06 23:33:43 +01:00

14 lines
232 B
Python

from autosummary_dummy_module import Foo
class InheritedAttrClass(Foo):
def __init__(self):
#: other docstring
self.subclassattr = "subclassattr"
super().__init__()
__all__ = ["InheritedAttrClass"]