I did not include the :private-members: option anywhere, but Sphinx still includes private attributes in the docs for the class. What am I doing wrong?
MWE:
mypackage/foo.py:
class MyClass(object): """A class. Attributes ---------- attr1 : float Attribute 1. attr2 : float Attribute 2. _private1 : float Private attribute 1. _private2 : float Private attribute 2. """ pass index.rst:
.. toctree:: :maxdepth: 2 :caption: Table of Contents foo foo.rst:
``foo`` Module ============== .. automodule:: mypackage.foo :members: conf.py:
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. import os import sys sys.path.insert(0, os.path.abspath('../')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', ] source_suffix = '.rst' master_doc = 'index' language = 'en' Rendered html:
