You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Super class with property docstrings defined: link
From looking at the pytokdocs source code, I think the problem is because the get_property_documentation method is using inspect.getdoc on prop.fget instead of prop directly (link).
Based on my experimentation below, both the property itself and fget work for the superclass but only the property and not fget work the subclass.
Describe the bug
Properties do not properly inherit docstrings from parent class if they are not set.
To Reproduce
I observed this when rendering documentation using mkdocstrings.
From looking at the pytokdocs source code, I think the problem is because the
get_property_documentation
method is usinginspect.getdoc
onprop.fget
instead ofprop
directly (link).Based on my experimentation below, both the property itself and
fget
work for the superclass but only the property and notfget
work the subclass.Created on 2021-02-05 by the reprexpy package
Expected behavior
Sub class properties should inherit docstrings from their parents when not set.
System (please complete the following information):
The text was updated successfully, but these errors were encountered: