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