Skip to content

Commit b13b4d6

Browse files
committed
Documentation
1 parent 6835d6c commit b13b4d6

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

crates/ruff_linter/src/rules/pylint/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ mod tests {
441441
Ok(())
442442
}
443443

444-
445444
#[test_case(Rule::BadStrStripCall, Path::new("bad_str_strip_call.py"))]
446445
fn preview_rules(rule_code: Rule, path: &Path) -> Result<()> {
447446
let snapshot = format!(

crates/ruff_linter/src/rules/pylint/rules/repeated_equality_comparison.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)