mirror of https://github.com/astral-sh/ruff
The PR add the `fix safety` section for rule `SIM103` (#15584 ) ### Unsafe Fix Example ```python class Foo: def __eq__(self, other): return 1 def foo(): if Foo() == 1: return True return False def foo_fix(): return Foo() == 1 print(foo()) # True print(foo_fix()) # 1 ``` ### Note I updated the code snippet example, because I thought it was cool to have a correct example, i.e., that I can paste inside the playground and it works :-) |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| Cargo.toml | ||