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.
pylint
PLE4703
1 parent b2d9f59 commit d545b5bCopy full SHA for d545b5b
crates/ruff_linter/src/rules/pylint/rules/modified_iterating_set.rs
@@ -38,6 +38,11 @@ use crate::checkers::ast::Checker;
38
/// nums.add(num + 5)
39
/// ```
40
///
41
+/// ## Fix safety
42
+/// This fix is always unsafe because it changes the program’s behavior. Replacing the
43
+/// original set with a copy during iteration allows code that would previously raise a
44
+/// `RuntimeError` to run without error.
45
+///
46
/// ## References
47
/// - [Python documentation: `set`](https://docs.python.org/3/library/stdtypes.html#set)
48
#[derive(ViolationMetadata)]
0 commit comments