You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per [1], automodule with the members option will document members with __module__ set to the module's name. However, docstrings of private class attributes (where the class has __module__ set) are ignored, even though the class is correctly documented and the attribute name appears.
$ git clone https://github.com/cimes-isi/sphinx-private-module-class-field-docstring.git
$ cd sphinx-private-module-class-field-docstring
$ pip install sphinx
$ cd docs
$ make html
Open docs/build/html/testmod.html and see that ClassPrivate.foo is missing its docstring.
Expected behavior
The class attributes' docstrings should appear in the generated documentation.
Describe the bug
Per [1],
automodule
with themembers
option will document members with__module__
set to the module's name. However, docstrings of private class attributes (where the class has__module__
set) are ignored, even though the class is correctly documented and the attribute name appears.[1] https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
How to Reproduce
Open
docs/build/html/testmod.html
and see thatClassPrivate.foo
is missing its docstring.Expected behavior
The class attributes' docstrings should appear in the generated documentation.
Your project
https://github.com/cimes-isi/sphinx-private-module-class-field-docstring
Screenshots
OS
MacOS Big Sur
Python version
3.8.2
Sphinx version
4.3.1
Sphinx extensions
sphinx.ext.autodoc
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: