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

Enable the inheritance of classmethod for docstrings #58

Open
cgarciae opened this issue Jul 27, 2020 · 4 comments
Open

Enable the inheritance of classmethod for docstrings #58

cgarciae opened this issue Jul 27, 2020 · 4 comments
Labels
bug Something isn't working docstrings Docstrings parsing module:loader

Comments

@cgarciae
Copy link

Currently the docstrings for inherited classmethods are completely ignored, this forces the user make trivial reimplementation of methods such as __init__ just to show proper documentation.

Original disscutions: mkdocstrings/mkdocstrings#78 (comment)

@pawamoy pawamoy added bug Something isn't working docstrings Docstrings parsing module:loader labels Jul 29, 2020
@joschif
Copy link

joschif commented Dec 11, 2020

Are there any news about this? Being able to inherit __init__ docstrings would be super helpful! It also seems like even docstrings of reimplemented __init__methods are not displayed for subclasses.

@samsja
Copy link

samsja commented Mar 17, 2023

Is there any news on this ?

@pawamoy
Copy link
Member

pawamoy commented Mar 19, 2023

Hello, no news unfortunately! Pull requests are welcome if you want to try and fix this. It seems to happen here: https://github.com/mkdocstrings/pytkdocs/blob/master/src/pytkdocs/loader.py#L911. I'm not sure why inspect.getdoc does not look up into base classes since it's supposed to: https://docs.python.org/3/library/inspect.html#inspect.getdoc

@samsja
Copy link

samsja commented Mar 20, 2023

@pawamoy Thanks. I will try to take a look and maybe do a PR if a find a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docstrings Docstrings parsing module:loader
Projects
None yet
Development

No branches or pull requests

4 participants