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

Special member is not documented with automodule #9175

Closed
kasium opened this issue May 7, 2021 · 0 comments
Closed

Special member is not documented with automodule #9175

kasium opened this issue May 7, 2021 · 0 comments

Comments

@kasium
Copy link

kasium commented May 7, 2021

Describe the bug
If I have a module which has a special attribute (starting with a double underscore) it will not be documented by automodule even if it's specified in :special-members:. According to my research it's because it's not identified as an attribute.

If a non-special attribute is used, everything works fine.

To Reproduce

module.py

#: mydoc
__dummy__ = 2
#: mydoc
dummy = 2

doc.rst

.. automodule:: my_project
   :members:
   :undoc-members:
   :show-inheritance:
   :private-members:
   :special-members: __dummy__

To execute the build I use python setup.py build_sphinx

Expected behavior
The attribute should be documented.

Environment info

  • OS: Linux
  • Python version: 3.7.1
  • Sphinx version: 3.5.4
@kasium kasium added the type:bug label May 7, 2021
@tk0miya tk0miya added this to the 4.1.0 milestone May 8, 2021
@tk0miya tk0miya closed this as completed in d69c35b May 9, 2021
tk0miya added a commit that referenced this issue May 9, 2021
Fix #9175: autodoc: Special member is not documented in the module
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 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

2 participants