-
-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
If a class derives from an ABC using the abc module, its members are not included in the generated autosummary RST (regardless of whether the derived class is abstract or concrete at runtime).
This happens because the abc module always sets empty __slots__ on abstract classes, and __slots__ take precedence over the class __dict__ when automodsumm searches for class members (see these lines). Thus, any class with an ABC in its inheritance chain will have an empty __slots__ attribute (unless other classes have added attributes to __slots__ along the way).
I'll have a PR in shortly with a minimal unit test case that reproduces the issue, and will include a potential fix.
The issue was originally discovered here: sunpy/sunpy#2348
Metadata
Metadata
Assignees
Labels
No labels