Skip to content

Option to disable docstring inheritance #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dhowland opened this issue Oct 9, 2024 · 2 comments
Open

Option to disable docstring inheritance #489

dhowland opened this issue Oct 9, 2024 · 2 comments

Comments

@dhowland
Copy link

dhowland commented Oct 9, 2024

I have read the sphinx-autoapi documentation thoroughly but it isn't clear exactly how Sphinx's autodoc is leveraged by sphinx-autoapi. In any case, the following does not work:

...
extensions = ['autoapi.extension', 'sphinx.ext.autodoc']
autodoc_inherit_docstrings = False
...

So there appears to be no way to instruct sphinx-autoapi not to inherit docstrings.

I would prefer being able to fine-tune autodoc directly (as above), but if that just isn't compatible with the sphinx-autoapi architecture, I would certainly settle for an equivalent of the autodoc_inherit_docstrings setting.

Edited to remove incorrect assumption

@mrbmp33
Copy link

mrbmp33 commented Apr 4, 2025

please, this would be very helpful. The unittest.TestCase type has an issue with its docstring, when I inherit from it, it adds the docstring in the output and raises an error for a text I didn't write.

@lannocc
Copy link

lannocc commented Apr 23, 2025

I'm also interested in how to accomplish this, for the same reason as the original requester. I need just that specific option, but some way to generally pass-through options to autodoc would be cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants