Skip to content

Commit

Permalink
sphinx_automodapi/automodsumm.py: address #132
Browse files Browse the repository at this point in the history
The members of ABC-derived classes were not being listed when they used
a custom metaclass deriving from ABCMeta. The fix is not just test for
exact equality of the ABCMeta metaclass, but subclassness.
  • Loading branch information
pkgw committed Jun 14, 2021
1 parent 39609d0 commit 403620a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_automodapi/automodsumm.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def get_members_class(obj, typ, include_public=[],
# class `__dict__` instead.
declares_slots = (
hasattr(obj, '__slots__') and
not (type(obj) is abc.ABCMeta and
not (issubclass(type(obj), abc.ABCMeta) and
len(obj.__slots__) == 0)
)

Expand Down

0 comments on commit 403620a

Please sign in to comment.