From 66794bc9feecf814473eb1a595134ef716950ef0 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 17 Nov 2023 09:26:29 -0800 Subject: [PATCH] Remove erroneous bad-dunder-name reference (#8742) Closes #8731. --- .../src/rules/pylint/rules/bad_dunder_method_name.rs | 2 +- ...nt__tests__PLW3201_bad_dunder_method_name.py.snap | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/ruff_linter/src/rules/pylint/rules/bad_dunder_method_name.rs b/crates/ruff_linter/src/rules/pylint/rules/bad_dunder_method_name.rs index 838c7ae77c66b..752c3a67351ee 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/bad_dunder_method_name.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/bad_dunder_method_name.rs @@ -44,7 +44,7 @@ impl Violation for BadDunderMethodName { #[derive_message_formats] fn message(&self) -> String { let BadDunderMethodName { name } = self; - format!("Bad or misspelled dunder method name `{name}`. (bad-dunder-name)") + format!("Bad or misspelled dunder method name `{name}`") } } diff --git a/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLW3201_bad_dunder_method_name.py.snap b/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLW3201_bad_dunder_method_name.py.snap index 47d5afe442272..fb777d47a8fd1 100644 --- a/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLW3201_bad_dunder_method_name.py.snap +++ b/crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLW3201_bad_dunder_method_name.py.snap @@ -1,7 +1,7 @@ --- source: crates/ruff_linter/src/rules/pylint/mod.rs --- -bad_dunder_method_name.py:5:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) +bad_dunder_method_name.py:5:9: PLW3201 Bad or misspelled dunder method name `_init_` | 4 | class Apples: 5 | def _init_(self): # [bad-dunder-name] @@ -9,7 +9,7 @@ bad_dunder_method_name.py:5:9: PLW3201 Bad or misspelled dunder method name `_in 6 | pass | -bad_dunder_method_name.py:8:9: PLW3201 Bad or misspelled dunder method name `__hello__`. (bad-dunder-name) +bad_dunder_method_name.py:8:9: PLW3201 Bad or misspelled dunder method name `__hello__` | 6 | pass 7 | @@ -18,7 +18,7 @@ bad_dunder_method_name.py:8:9: PLW3201 Bad or misspelled dunder method name `__h 9 | print("hello") | -bad_dunder_method_name.py:11:9: PLW3201 Bad or misspelled dunder method name `__init_`. (bad-dunder-name) +bad_dunder_method_name.py:11:9: PLW3201 Bad or misspelled dunder method name `__init_` | 9 | print("hello") 10 | @@ -28,7 +28,7 @@ bad_dunder_method_name.py:11:9: PLW3201 Bad or misspelled dunder method name `__ 13 | pass | -bad_dunder_method_name.py:15:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) +bad_dunder_method_name.py:15:9: PLW3201 Bad or misspelled dunder method name `_init_` | 13 | pass 14 | @@ -38,7 +38,7 @@ bad_dunder_method_name.py:15:9: PLW3201 Bad or misspelled dunder method name `_i 17 | pass | -bad_dunder_method_name.py:19:9: PLW3201 Bad or misspelled dunder method name `___neg__`. (bad-dunder-name) +bad_dunder_method_name.py:19:9: PLW3201 Bad or misspelled dunder method name `___neg__` | 17 | pass 18 | @@ -48,7 +48,7 @@ bad_dunder_method_name.py:19:9: PLW3201 Bad or misspelled dunder method name `__ 21 | pass | -bad_dunder_method_name.py:23:9: PLW3201 Bad or misspelled dunder method name `__inv__`. (bad-dunder-name) +bad_dunder_method_name.py:23:9: PLW3201 Bad or misspelled dunder method name `__inv__` | 21 | pass 22 |