How can I use Sphinx' Autodoc-extension for private methods?

cnu picture cnu · Jul 19, 2009 · Viewed 13.3k times · Source

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?

Answer

mariotomo picture mariotomo · Oct 12, 2011

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: