ALL-CLAS0005 · evidence
This page continues ALL-CLAS0005 directly from its source docstring. Read its implementation.
Evidence
Section titled “Evidence”Each finding records the derived class range, its declared bases, and every ancestor name above it. The value is the number of distinct ancestors. Any link other than the one to the first declared base measures zero, so the class is counted once.
Exceptions
Section titled “Exceptions”Ancestors this repository does not declare are counted by name but their own ancestors are not, since nothing here can read them. A class whose bases are all external therefore has no inheritance link at all and is not judged, which is deliberate, because a chain a project does not own is not a chain it can shorten.
References
Section titled “References”- Generalizes Pylint R0901 too-many-ancestors. Open reference
- Generalizes SonarSource S110. Open reference
- Cites “Effective Java”, favor composition over inheritance
- Cites “Design Patterns”, on the cost of deep class hierarchies