From 6d99e18c0358182aa33ee7554d2b1b4be46383a7 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Fri, 5 Jan 2024 10:12:31 +0100 Subject: [PATCH 1/2] homogenize PLR0914 message to match other PLR 09XX rules Signed-off-by: Mikael Arguedas --- crates/ruff_linter/src/rules/pylint/rules/too_many_locals.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/rules/pylint/rules/too_many_locals.rs b/crates/ruff_linter/src/rules/pylint/rules/too_many_locals.rs index e2137b637bf52..ffdd7e34d283a 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/too_many_locals.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/too_many_locals.rs @@ -32,7 +32,7 @@ impl Violation for TooManyLocals { current_amount, max_amount, } = self; - format!("Too many local variables: ({current_amount}/{max_amount})") + format!("Too many local variables ({current_amount}/{max_amount})") } } From be8e0823f3acbd79b3c1268228fbd80da4dbc212 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Fri, 5 Jan 2024 10:35:55 +0100 Subject: [PATCH 2/2] update snapshots Signed-off-by: Mikael Arguedas --- .../ruff_linter__rules__pylint__tests__too_many_locals.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__too_many_locals.snap b/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__too_many_locals.snap index 5150eac445d4e..99a0f2a9602b6 100644 --- a/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__too_many_locals.snap +++ b/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__too_many_locals.snap @@ -1,7 +1,7 @@ --- source: crates/ruff_linter/src/rules/pylint/mod.rs --- -too_many_locals.py:20:5: PLR0914 Too many local variables: (16/15) +too_many_locals.py:20:5: PLR0914 Too many local variables (16/15) | 20 | def func() -> None: # PLR0914 | ^^^^ PLR0914