diff --git a/crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs b/crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs index 5b4bda45a9..4ac8f3f79f 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs @@ -32,6 +32,12 @@ use crate::{AlwaysFixableViolation, Edit, Fix}; /// If the items are hashable, use a `set` for efficiency; otherwise, use a /// `tuple`. /// +/// ## Fix safety +/// This rule is always unsafe since literal sets and tuples +/// evaluate their members eagerly whereas `or` comparisons +/// are short-circuited. It is therefore possible that a fix +/// will change behavior in the presence of side-effects. +/// /// ## Example /// ```python /// foo == "bar" or foo == "baz" or foo == "qux"