econchick / econchick/interrogate

Feature request: Option to accept inherited docstrings

Open
#12 2 comments 3 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.