econchick / econchick/interrogate
Feature request: Option to accept inherited docstrings
- Dominant language
- Python
- Stars
- 676
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
**Is this a BUG REPORT or FEATURE REQUEST?**:
* [ ] bug
* [x] feature
## Description of Bug or Feature
Many tools (e.g. `inspect.getdoc`, Sphinx) allow methods in subclasses to inherit the docstring of the parent method:
```python
class Foo:
def do_it(self):
"""
Do the thing!
"""
pass
class SpecialFoo(Foo):
def do_it(self):
print('So special!')
```
In these cases, I usually only add a separate docstring to `SpecialFoo.do_it` if its behavior differs significantly from what one would expected after reading the docstring of `Foo.do_it`. In most cases, the docstring of `Foo.do_it` is just fine.
Hence I'd like an option to not count these cases as missing.
Contributor guide
Assessment
This issue has not been assessed yet.