We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
literal-membership
1 parent a6f7100 commit 05a2f52Copy full SHA for 05a2f52
crates/ruff_linter/src/rules/pylint/rules/literal_membership.rs
@@ -21,6 +21,12 @@ use crate::checkers::ast::Checker;
21
/// ```python
22
/// 1 in {1, 2, 3}
23
/// ```
24
+///
25
+/// ## Fix safety
26
+/// This rule's fix is marked as unsafe, as the use of a `set` literal will
27
+/// error at runtime if the sequence contains unhashable elements (like lists
28
+/// or dictionaries).
29
30
/// ## References
31
/// - [What’s New In Python 3.2](https://docs.python.org/3/whatsnew/3.2.html#optimizations)
32
#[violation]
0 commit comments