diff --git a/crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py b/crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py index f8aaddbf96946..cf264981284c2 100644 --- a/crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py +++ b/crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py @@ -91,6 +91,9 @@ def __special_custom_magic__(self): def __prepare__(): pass + def __mro_entries__(self, bases): + pass + def __foo_bar__(): # this is not checked by the [bad-dunder-name] rule ... diff --git a/crates/ruff_linter/src/rules/pylint/helpers.rs b/crates/ruff_linter/src/rules/pylint/helpers.rs index de867b31355e8..6c41fad31d3ce 100644 --- a/crates/ruff_linter/src/rules/pylint/helpers.rs +++ b/crates/ruff_linter/src/rules/pylint/helpers.rs @@ -280,6 +280,7 @@ pub(super) fn is_known_dunder_method(method: &str) -> bool { | "__missing__" | "__mod__" | "__module__" + | "__mro_entries__" | "__mul__" | "__ne__" | "__neg__"