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

Setting private class module name ignores class attribute docstrings #9933

Open
cimes-isi opened this issue Dec 2, 2021 · 0 comments
Open

Comments

@cimes-isi
Copy link

Describe the bug

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.

[1] https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

How to Reproduce

$ 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.

Your project

https://github.com/cimes-isi/sphinx-private-module-class-field-docstring

Screenshots

Screen Shot 2021-12-02 at 2 28 09 PM

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

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants