Sphinx doesn't generate docs for __init__(self) by default. I have tried the following:
.. automodule:: mymodule
:members:
and
..autoclass:: MyClass
:members:
In conf.py, setting the following only appends the __init__(self) docstring to the class docstring (the Sphinx autodoc documentation seems to agree that this is the expected behavior, but mentions nothing regarding the problem I'm trying to solve):
autoclass_content = 'both'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…