diff --git a/crates/ruff_linter/src/rules/pylint/helpers.rs b/crates/ruff_linter/src/rules/pylint/helpers.rs index 6091a9a6ca60e..7f6959341d27b 100644 --- a/crates/ruff_linter/src/rules/pylint/helpers.rs +++ b/crates/ruff_linter/src/rules/pylint/helpers.rs @@ -265,6 +265,7 @@ pub(super) fn is_known_dunder_method(method: &str) -> bool { | "__reduce__" | "__reduce_ex__" | "__release_buffer__" + | "__replace__" | "__repr__" | "__reversed__" | "__rfloordiv__" @@ -297,6 +298,8 @@ pub(super) fn is_known_dunder_method(method: &str) -> bool { | "__xor__" // Overridable sunder names from the `Enum` class. // See: https://docs.python.org/3/library/enum.html#supported-sunder-names + | "_add_alias_" + | "_add_value_alias_" | "_name_" | "_value_" | "_missing_"