0.13.0
Breaking Changes📦 ruffView on GitHub →
⚠ 4 breaking✨ 2 features🐛 2 fixes🔧 16 symbols
Summary
Ruff 0.13.0 introduces automatic future‑annotations insertion for several rules, tighter first‑party import detection, removal of the deprecated macOS config fallback, and adds preview support for UP043 in stub files along with uv formatter backend support.
⚠️ Breaking Changes
- Several rules (TC001, TC002, TC003, RUF013, UP037) now automatically add `from __future__ import annotations` when the `lint.future-annotations` setting is enabled, changing import handling.
- Ruff now verifies full module paths on disk before classifying imports as first‑party, improving import categorization.
- Deprecated rules must be selected by their exact rule code; group or prefix selection no longer activates them.
- The deprecated macOS user‑level configuration fallback (`~/Library/Application Support/ruff/ruff.toml`) has been removed; Ruff now only follows the XDG spec location.
Migration Steps
- If you rely on the macOS fallback config, move your configuration to `~/.config/ruff/ruff.toml` (or another XDG location).
- Enable or adjust the `lint.future-annotations` setting if you want the new automatic `from __future__ import annotations` behavior, or disable it to retain previous behavior.
- Update any rule selections that used group names or prefixes for deprecated rules to use the exact rule code.
- Review import categorization for projects with local directories named like third‑party packages, as the new full‑path check may reclassify some imports.
✨ New Features
- Preview feature: `UP043` can now be enabled in stub files.
- Server: support for using `uv` as an alternative formatter backend.
🐛 Bug Fixes
- `UP008` is now applied only when the __class__ cell exists.
- Fixed empty f‑string detection in `in-empty-collection` (RUF060).
🔧 Affected Symbols
TC001TC002TC003RUF013UP037UP043RUF060UP008assert-raises-exceptionmissing-trailing-commaprohibited-trailing-commaraw-string-in-exceptioninvalid-mock-accessuseless-import-aliasbidirectional-unicodemultiple-with-statements