diff --git a/sphinx_automodapi/automodsumm.py b/sphinx_automodapi/automodsumm.py index 10a71f6..e3579da 100644 --- a/sphinx_automodapi/automodsumm.py +++ b/sphinx_automodapi/automodsumm.py @@ -83,7 +83,6 @@ class members that are inherited from a base class. This value can be .. _sphinx.ext.inheritance_diagram: http://sphinx-doc.org/latest/ext/inheritance.html """ -import abc import inspect import os import re @@ -528,25 +527,11 @@ def get_members_class(obj, typ, include_public=[], items = [] # using dir gets all of the attributes, including the elements - # from the base class, otherwise use __slots__ or __dict__ + # from the base class, otherwise use __dict__ if include_base: names = dir(obj) else: - # Classes deriving from an ABC using the `abc` module will - # have an empty `__slots__` attribute in Python 3, unless - # other slots were declared along the inheritance chain. If - # the ABC-derived class has empty slots, we'll use the - # class `__dict__` instead. - declares_slots = ( - hasattr(obj, '__slots__') and - not (issubclass(type(obj), abc.ABCMeta) and - len(obj.__slots__) == 0) - ) - - if declares_slots: - names = tuple(getattr(obj, '__slots__')) - else: - names = getattr(obj, '__dict__').keys() + names = getattr(obj, '__dict__').keys() for name in names: try: