Files
sphinx/tests/roots/test-ext-autodoc/target/slots.py
Takeshi KOMIYA 9721327989 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.
2020-12-17 22:19:28 +09:00

22 lines
359 B
Python

class Foo:
"""docstring"""
__slots__ = ['attr']
class Bar:
"""docstring"""
__slots__ = {'attr1': 'docstring of attr1',
'attr2': 'docstring of attr2',
'attr3': None}
def __init__(self):
self.attr2 = None #: docstring of instance attr2
class Baz:
"""docstring"""
__slots__ = 'attr'