Sphinx Autodoc-skip-member Handler: Can't Show __init__() When Using Napoleon
I want to include the docstrings for __init__() in my sphinx-generated documentation. I was following the accepted answer to this stackoverflow question to add a handler for autodo
Solution 1:
Napoleon defers to your autodoc configuration for how you want to handle the __init__
method.
Check your autodoc settings in conf.py
. In particular, make sure autoclass_content is set to either init
or both
.
Solution 2:
Per Rob's followon at https://github.com/sphinx-doc/sphinx/issues/2374, if you're using any extension that also sets a handler for the "autodoc-skip-member" event only one of the handlers will be used. This would seem to be the issue at hand. Thanks Rob!
Post a Comment for "Sphinx Autodoc-skip-member Handler: Can't Show __init__() When Using Napoleon"