2025-09-10 · Astral

Ruff v0.13.0

tooling

read at source ↗ astral.sh

Ruff v0.13.0

Source: Astral Date: 2025-09-10 URL: https://astral.sh/blog/ruff-v0.13.0

Summary

Ruff v0.13.0 adds automatic from __future__ import annotations insertion as a fix action for type-checking rules (TC001-003, RUF013, UP037) via a new lint.future-annotations setting. First-party module detection is tightened — full path verification before classifying a local directory as first-party. 13 rules promoted from preview (Airflow, async utilities, type-checking), 2 rules removed (PD901, UP038). Deprecated rule codes no longer activate via group prefix — must be selected explicitly.

Implications

__future__ annotations auto-fix closes the 3.10+ migration path. Teams running Python 3.9 with heavy type annotation usage were stuck writing from __future__ import annotations manually or accepting slower startup times without it. Ruff can now insert it automatically as a fix — a small change that removes a real migration friction point. The tighter first-party detection is a bug class eliminated: false-positive import sorting is one of the most common reasons teams stay on isort alongside Ruff. These two changes together make Ruff safer to adopt as the sole import tool.

← all signals