mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Don't crash when autodocumenting classes with __slots__ = None
This commit is contained in:
parent
3360f2461c
commit
e3321bb3a9
@ -128,7 +128,7 @@ def get_object_members(subject, objpath, attrgetter, analyzer=None):
|
||||
members[name] = Attribute(name, True, value)
|
||||
|
||||
# members in __slots__
|
||||
if isclass(subject) and hasattr(subject, '__slots__'):
|
||||
if isclass(subject) and getattr(subject, '__slots__', None) is not None:
|
||||
from sphinx.ext.autodoc import SLOTSATTR
|
||||
|
||||
for name in subject.__slots__:
|
||||
|
Loading…
Reference in New Issue
Block a user