pytkdocs
pytkdocs copied to clipboard
Enable the inheritance of classmethod for docstrings
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: https://github.com/pawamoy/mkdocstrings/issues/78#issuecomment-664537828
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.
Is there any news on this ?
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
@pawamoy Thanks. I will try to take a look and maybe do a PR if a find a fix