0.13.1
📦 ruffView on GitHub →
✨ 11 features🐛 7 fixes🔧 11 symbols
Summary
Ruff 0.13.1 introduces several preview lint fixes, new rule behaviors, CLI improvements, and numerous bug fixes, while raising the Rust MSRV to 1.88.
✨ New Features
- `flake8-simplify`: Detect unnecessary `None` default for additional key expression types (`SIM910`).
- `flake8-use-pathlib`: Add fix for `PTH123`.
- `flake8-use-pathlib`: Fix `PTH101`, `PTH104`, `PTH105`, `PTH121`.
- `flake8-use-pathlib`: Make `PTH111` fix unsafe because it can change behavior.
- `pycodestyle`: Fix `E301` to only trigger for functions immediately within a class.
- `refurb`: Mark `single-item-membership-test` fix as always unsafe (`FURB171`).
- `RUF102`: Respect rule redirects in invalid rule code detection.
- `flake8-bugbear`: Mark the fix for `unreliable-callable-check` as always unsafe (`B004`).
- `ruff`: Allow dataclass attribute value instantiation from nested frozen dataclass (`RUF009`).
- `ruff` CLI: Add fixes to `output-format=sarif`.
- `ruff` CLI: Treat panics as fatal diagnostics, sort panics last.
🐛 Bug Fixes
- Handle t-strings for token-based rules and suppression comments.
- `flake8-bandit`: Fix truthiness: dict-only `**` displays not truthy for `shell` (`S602`, `S604`, `S609`).
- `flake8-simplify`: Fix diagnostic to show correct method name for `str.rsplit` calls (`SIM905`).
- `flynt`: Use triple quotes for joined raw strings with newlines (`FLY002`).
- `pyupgrade`: Fix false positive when class name is shadowed by local variable (`UP008`).
- `pyupgrade`: Prevent infinite loop with `I002` and `UP026`.
- `ruff`: Recognize t-strings, generators, and lambdas in `invalid-index-type` (`RUF016`).
🔧 Affected Symbols
flake8-simplifyflake8-use-pathlibpycodestylerefurbflake8-banditflyntpyupgraderuffRUF102RUF009RUF016