[pylint] Implement too-many-public-methods rule (PLR0904) (#6179)

Implement
https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/too-many-public-methods.html

Confusingly the rule page mentions a max of 7 while in practice it is
20.
https://github.com/search?q=repo%3Apylint-dev%2Fpylint+max-public-methods&type=code

## Summary

Implement pylint's R0904

## Test Plan

Unit tests.
This commit is contained in:
Jelle van der Waa 2023-09-14 02:52:26 +02:00 committed by GitHub
parent 36fa1fe359
commit 04183b0299
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 283 additions and 2 deletions

View file

@ -851,7 +851,7 @@ mod tests {
Rule::QuadraticListSummation,
];
const PREVIEW_RULES: &[Rule] = &[Rule::SliceCopy];
const PREVIEW_RULES: &[Rule] = &[Rule::TooManyPublicMethods, Rule::SliceCopy];
#[allow(clippy::needless_pass_by_value)]
fn resolve_rules(