-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Describe the bug
Docstrings are not inherited. Considering this is not any special case and it defined by the Python standard, I thought it would be appropriate to open the issue here, but the end goal is for mkdocstrings.
To Reproduce
Steps to reproduce the behavior:
class A:
def foo(self):
"""This is a docstring"""
class B(A):
def foo(self):
# Inherited docstring defined in A.foo>>> from griffe.loader import GriffeLoader
>>> loader = GriffeLoader()
>>> module = loader.load_module("module")
>>> print(module.classes["A"].functions["foo"].docstring)
This is a docstring
>>> print(module.classes["B"].functions["foo"].docstring)
NoneExpected behavior
Docstrings are inherited.
System:
griffeversion: 0.22.0- Python version: 3.10.4
- OS: Linux
Additional context
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels