File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
crates/ruff_linter/src/rules/pylint/rules Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ use crate::Locator;
1818/// Checks for repeated equality comparisons that can be rewritten as a membership
1919/// test.
2020///
21+ /// This rule will try to determine if the values are hashable
22+ /// and the fix will use a `set` if they are. If unable to determine, the fix
23+ /// will use a `tuple` and suggest the use of a `set`.
24+ ///
2125/// ## Why is this bad?
2226/// To check if a variable is equal to one of many values, it is common to
2327/// write a series of equality comparisons (e.g.,
@@ -28,10 +32,6 @@ use crate::Locator;
2832/// If the items are hashable, use a `set` for efficiency; otherwise, use a
2933/// `tuple`.
3034///
31- /// This rule will try to determine if the values are hashable
32- /// and the fix will use a `set` if they are. If unable to determine, the fix
33- /// will use a `tuple` and continue to suggest the use of a `set`.
34- ///
3535/// ## Example
3636/// ```python
3737/// foo == "bar" or foo == "baz" or foo == "qux"
You can’t perform that action at this time.
0 commit comments