The automatically generated documentation duplicates the Methods
for the Test class, as shown below. Why is this duplication occurring and how can it be stopped?
I have tried several variations within the conf.py
module, but it has been to no avail. After the documentation image, there is a redacted version of this module.
class Test(object):
"""
Something here for test.
"""
def __init__(self):
pass
def fit(X, y):
pass
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'numpydoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.imgconverter']
numpydoc_class_members_toctree = False
autodoc_default_options = {'members': True,
'inherited-members': True,
'show-inheritance': True}
For anyone else that faces this issue, I was able to fix it by replacing 'numpydoc'
with 'sphinx.ext.napoleon'
. Additionally, I removed numpydoc_class_members_toctree = False
.