Skip to content
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

Inherit docstrings from Base to Derived Class #295

Open
ktsitsi opened this issue Oct 13, 2023 · 1 comment
Open

Inherit docstrings from Base to Derived Class #295

ktsitsi opened this issue Oct 13, 2023 · 1 comment

Comments

@ktsitsi
Copy link

ktsitsi commented Oct 13, 2023

I have the case where multiple classes (Derived Classes) - which are implementations of a Base Class - do not inherit the docstrings of abstract functions and attributes of the latter. Although I looked it up I could not really find some option to enable it. I mostly need this cause in the general inheritance case I wouldn't want to make the code verbose with copies of the same docstring in the function & properties of each of the derived class.

Looking up the issues I found this one #224. But it does not quite fit my case.
I think that it should be sth similar to Sphinx's autodoc_inherit_docstrings = True

@ktsitsi ktsitsi changed the title Inherit docstrings from Base to Derived Class. Inherit docstrings from Base to Derived Class Oct 13, 2023
@machow
Copy link
Owner

machow commented Oct 13, 2023

Hey, thanks for raising this! There is some discussion on mkdocstrings/griffe#96 about adding this functionality to griffe, the tool we use to find python objects.

I think we should have everything to add an inherit_docstrings option to quartodoc, but haven't implemented yet.

edit: linking to the sphinx code so it's easy to find later

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

No branches or pull requests

2 participants