I'm using sphinx and the autodoc extension to automatically generate documentation from docstrings in my python modules.
I currently using the automodule
directive to document all the public members of the module
.. automodule::
:members:
My module also has a number of private attributes. I'd like to include one of them in the documentation.
Is there a way to tell automodule
to document all public members and also this one private member? I've tried using the :private-members:
option, but that includes all private members. I've also tried manually specifying the private attribute, but then it doesn't document any of the public members.
.. automodule::
:members: _PRIVATE_ATTR
I'd like to avoid having to manually list every single public member just to add this one private member.
Is there a way to do this with autodoc?