[`flake8-simplify`] add fix safety section (`SIM112`) (#18099)

The PR add the `fix safety` section for rule `SIM112` (#15584 ).
This commit is contained in:
Vasco Schiavo 2025-05-14 23:16:20 +02:00 committed by GitHub
parent 33e14c5963
commit 466021d5e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ use crate::checkers::ast::Checker;
/// os.environ["FOO"]
/// ```
///
/// ## Fix safety
///
/// This fix is always marked as unsafe because automatically capitalizing environment variable names
/// can change program behavior in environments where the variable names are case-sensitive, such as most
/// Unix-like systems.
///
/// ## References
/// - [Python documentation: `os.environ`](https://docs.python.org/3/library/os.html#os.environ)
#[derive(ViolationMetadata)]