mirror of https://github.com/astral-sh/ruff
[`flake8-simplify`] add fix safety section (`SIM112`) (#18099)
The PR add the `fix safety` section for rule `SIM112` (#15584 ).
This commit is contained in:
parent
33e14c5963
commit
466021d5e1
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue