diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-04-30 22:54:49 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-04-30 22:54:49 +0900 |
commit | d612ef8f0ba9d608a2aace13b96f3d6d4054c4fc (patch) | |
tree | a97df493bf28c80eca73946babb3660f1d2e755b /sphinx/ext/autodoc/importer.py | |
parent | 5460ad6925199b57b27b7d059825d3560872edbb (diff) | |
download | sphinx-git-d612ef8f0ba9d608a2aace13b96f3d6d4054c4fc.tar.gz |
Fix #6857: autodoc: failed to detect a classmethod on Enum class
Diffstat (limited to 'sphinx/ext/autodoc/importer.py')
-rw-r--r-- | sphinx/ext/autodoc/importer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc/importer.py b/sphinx/ext/autodoc/importer.py index e98b97915..432aa0c85 100644 --- a/sphinx/ext/autodoc/importer.py +++ b/sphinx/ext/autodoc/importer.py @@ -142,8 +142,9 @@ def get_object_members(subject: Any, objpath: List[str], attrgetter: Callable, members[name] = Attribute(name, True, value) superclass = subject.__mro__[1] - for name, value in obj_dict.items(): + for name in obj_dict: if name not in superclass.__dict__: + value = safe_getattr(subject, name) members[name] = Attribute(name, True, value) # members in __slots__ |