ruff/crates/ruff_linter
Vasco Schiavo 68559fc17d
[`flake8-simplify`] add fix safety section (`SIM103`) (#18086)
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 :-)
2025-05-14 14:24:15 -04:00
..
resources [`flake8-simplify`] Correct behavior for `str.split`/`rsplit` with `maxsplit=0` (`SIM905`) (#18075) 2025-05-14 14:20:18 -04:00
src [`flake8-simplify`] add fix safety section (`SIM103`) (#18086) 2025-05-14 14:24:15 -04:00
Cargo.toml Bump 0.11.9 (#17986) 2025-05-09 10:43:27 -05:00