mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user