Skip to content

Commit 466021d

Browse files
authored
[flake8-simplify] add fix safety section (SIM112) (#18099)
The PR add the `fix safety` section for rule `SIM112` (#15584 ).
1 parent 33e14c5 commit 466021d

File tree

1 file changed

+6
-0
lines changed
  • crates/ruff_linter/src/rules/flake8_simplify/rules

1 file changed

+6
-0
lines changed

crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ use crate::checkers::ast::Checker;
3232
/// os.environ["FOO"]
3333
/// ```
3434
///
35+
/// ## Fix safety
36+
///
37+
/// This fix is always marked as unsafe because automatically capitalizing environment variable names
38+
/// can change program behavior in environments where the variable names are case-sensitive, such as most
39+
/// Unix-like systems.
40+
///
3541
/// ## References
3642
/// - [Python documentation: `os.environ`](https://docs.python.org/3/library/os.html#os.environ)
3743
#[derive(ViolationMetadata)]

0 commit comments

Comments
 (0)