mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
[pylint
] Implement too-many-positional
(PLR0917
) (#8995)
## Summary Adds a rule that bans too many positional (i.e. not keyword-only) parameters in function definitions. Fixes https://github.com/astral-sh/ruff/issues/8946 Rule ID code taken from https://github.com/pylint-dev/pylint/pull/9278 ## Test Plan 1. fixtures file checking multiple OKs/fails 2. parametrized test file
This commit is contained in:
parent
060a25df09
commit
b90027d037
12 changed files with 209 additions and 0 deletions
|
@ -254,6 +254,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Pylint, "R0913") => (RuleGroup::Stable, rules::pylint::rules::TooManyArguments),
|
||||
(Pylint, "R0915") => (RuleGroup::Stable, rules::pylint::rules::TooManyStatements),
|
||||
(Pylint, "R0916") => (RuleGroup::Preview, rules::pylint::rules::TooManyBooleanExpressions),
|
||||
(Pylint, "R0917") => (RuleGroup::Preview, rules::pylint::rules::TooManyPositional),
|
||||
(Pylint, "R1701") => (RuleGroup::Stable, rules::pylint::rules::RepeatedIsinstanceCalls),
|
||||
(Pylint, "R1704") => (RuleGroup::Preview, rules::pylint::rules::RedefinedArgumentFromLocal),
|
||||
(Pylint, "R1711") => (RuleGroup::Stable, rules::pylint::rules::UselessReturn),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue