Migrating to Ruff 0.13.0
Version 0.13.0 introduces 4 breaking changes. This guide details how to update your code.
Released: 9/10/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
TC001TC002TC003RUF013UP037UP043RUF060UP008assert-raises-exceptionmissing-trailing-commaprohibited-trailing-commaraw-string-in-exceptioninvalid-mock-accessuseless-import-aliasbidirectional-unicodemultiple-with-statementsBreaking Changes
●Issue #1
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.
●Issue #2
Ruff now verifies full module paths on disk before classifying imports as first‑party, improving import categorization.
●Issue #3
Deprecated rules must be selected by their exact rule code; group or prefix selection no longer activates them.
●Issue #4
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
- 1If you rely on the macOS fallback config, move your configuration to `~/.config/ruff/ruff.toml` (or another XDG location).
- 2Enable 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.
- 3Update any rule selections that used group names or prefixes for deprecated rules to use the exact rule code.
- 4Review import categorization for projects with local directories named like third‑party packages, as the new full‑path check may reclassify some imports.
Release 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.
Need More Details?
View the full release notes and all changes for Ruff 0.13.0.
View Full Changelog