Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tk0miya opened this issue Dec 16, 2020 · 0 comments
Closed

Comments

@tk0miya
Copy link
Member

tk0miya commented Dec 16, 2020

Describe the bug
autodoc: a slots attribute is not documented even having docstring

To Reproduce

# example.py
class Foo:
    """docstring"""

    __slots__ = {
        'attr': 'docstring'
    }
# index.rst
.. automodule:: example
   :members:

Note: The document for Foo.attr is generated when I give :undoc-members: option.

Expected behavior
It is documented.

Your project
No.

Screenshots
No

Environment info

  • OS: Mac
  • Python version: 3.9.1
  • Sphinx version: HEAD of 3.x
  • Sphinx extensions: sphinx.ext.autodoc
  • Extra tools: No

Additional context
No

@tk0miya tk0miya added this to the 3.4.0 milestone Dec 16, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Dec 16, 2020
… 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.
tk0miya added a commit that referenced this issue Dec 17, 2020
…cstring

Fix #8545: autodoc: a __slots__ attribute is not documented even having docstring
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant