I am using Sphinx for documenting my python project. I have the autodoc extension enabled and have the following in my docs.
.. autoclass:: ClassName :members:
The problem is, it only documents the non-private methods in the class. How do I include the private methods too?
autodoc provides several directives that are versions of the usual py:module , py:class and so forth. On parsing time, they import the corresponding module and extract the docstring of the given objects, inserting them into the page source under a suitable py:module , py:class etc. directive.
if you are using sphinx 1.1 or above, from the sphinx documentation site at http://www.sphinx-doc.org/en/master/ext/autodoc.html,
:special-members: :private-members:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With