Skip to content

Commit

Permalink
fix defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Dec 17, 2023
1 parent b72a362 commit 2364cfb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/rules/pylint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ mod tests {
Path::new("pylint/too_many_locals.py"),
&LinterSettings {
pylint: pylint::settings::Settings {
max_locals: 11,
max_locals: 15,
..pylint::settings::Settings::default()
},
..LinterSettings::for_rules(vec![Rule::TooManyLocals])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ruff_macros::{derive_message_formats, violation};
/// ## What it does
/// Checks for functions/methods that include too many local variables.
///
/// By default, this rule allows up to eleven arguments, as configured by the
/// By default, this rule allows up to fifteen arguments, as configured by the
/// [`pylint.max-locals`] option.
///
/// ## Why is this bad?
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/rules/pylint/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Default for Settings {
max_branches: 12,
max_statements: 50,
max_public_methods: 20,
max_locals: 11,
max_locals: 15,
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
too_many_locals.py:18:5: PLR0914 Too many local variables: (15/11)
|
16 | thirteenth = 13
17 | fourteenth = 14
18 | fifteenth = 15
| ^ PLR0914
19 |
20 | def func():
|

too_many_locals.py:36:5: PLR0914 Too many local variables: (16/11)
too_many_locals.py:36:5: PLR0914 Too many local variables: (16/15)
|
34 | thirteenth = 13
35 | fourteenth = 14
Expand Down

0 comments on commit 2364cfb

Please sign in to comment.