Fix #8545: autodoc: a __slots__ attribute is not documented even having docstring

To avoid filtering __slots__ attributes having docstring at
filter_members(), this passes docstring captured at get_class_members()
to the filter_members() via ObjectMember.
This commit is contained in:
Takeshi KOMIYA
2020-12-17 03:31:45 +09:00
parent 964392d316
commit 9721327989
6 changed files with 56 additions and 7 deletions

View File

@@ -1,8 +1,12 @@
class Foo:
"""docstring"""
__slots__ = ['attr']
class Bar:
"""docstring"""
__slots__ = {'attr1': 'docstring of attr1',
'attr2': 'docstring of attr2',
'attr3': None}
@@ -12,4 +16,6 @@ class Bar:
class Baz:
"""docstring"""
__slots__ = 'attr'