From 5b500b838bb4887d7a90570d56694e5f91dc132c Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Thu, 7 Nov 2024 11:39:00 +0530 Subject: [PATCH] Update known dunder methods for Python 3.13 (#14146) ## Summary Closes: #14145 --- crates/ruff_linter/src/rules/pylint/helpers.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ruff_linter/src/rules/pylint/helpers.rs b/crates/ruff_linter/src/rules/pylint/helpers.rs index 6091a9a6ca..7f6959341d 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_"