-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
Describe the bug
The documentation for a classmethod in a parent class is not inherited by the method re-defined (without documentation) in a child class
How to Reproduce
Module src/spam.py:
class Parent:
@classmethod
def method(cls) -> int:
"""Return an integer."""
return 17
class Child(Parent):
@classmethod
def method(cls):
return 42Sphinx configuration docs/conf.py:
project = "spam"
extensions = ["sphinx.ext.autodoc"]Documentation index docs/index.rst:
spam
====
.. automodule:: spam
:members:
:undoc-members:Build:
PYTHONPATH=src sphinx-build docs/ buildExpected behavior
Overridden classmethod to inherit documentation from parent class
Your project
https://github.com/EpicWink/python-swf-typed
Screenshots
OS
Ubuntu 20.04
Python version
3.8
Sphinx version
4.2.0
Sphinx extensions
sphinx.ext.autodoc
Additional context
inspect.getdoc(Child.method) returns the expected value
