Ruff v0.10.0
read at source ↗ astral.sh
Ruff v0.10.0
Source: Astral Date: 2025-03-13 URL: https://astral.sh/blog/ruff-v0.10.0
Summary
Ruff v0.10.0 adds automatic requires-python detection from pyproject.toml even without a [tool.ruff] section, and searches parent directories for version config. TYPE_CHECKING guard detection is tightened — if 0 and if False patterns no longer count, aligning with mypy and Pyright behaviour. noqa comments are more lenient on syntax (missing commas produce warnings, not failures). 20 rules stabilized from preview.
Implications
requires-python auto-detection is a zero-config adoption improvement. Projects that haven’t added a [tool.ruff] section yet get correct version-aware linting just by having a standard pyproject.toml — lowering the adoption floor. The TYPE_CHECKING alignment with mypy/Pyright is a correctness move that will break some legacy patterns (if 0: as a dead-code guard), but it’s the right call for ecosystem coherence. Ruff increasingly tracks mypy and Pyright behaviour rather than defining its own, which reduces the “pick your tool” decision for teams who want consistent type-checking semantics across their toolchain.