Ruff v0.12.0 is released with several notable changes. The linter now detects two additional classes of syntax errors: version-related syntax errors (e.g., using match statements before Python 3.10) and errors previously only caught by CPython's bytecode compiler (e.g., duplicate function parameter names, yield/return outside functions). A new dual-default Python version system is introduced: 'latest' (3.13) for syntax error detection and 'oldest' (3.9) for everything else. The rust-toolchain.toml file is no longer bundled in source distributions, making it easier to build from source with MSRV-compatible toolchains. F-string formatting with format specifiers is updated to comply with Python 3.13.4's grammar changes. Twenty-two rules are stabilized out of preview, one rule is deprecated, and one (S320) is removed.
Table of contents
Migrating to v0.12 #Rule stabilizations #Other behavior stabilizations #Rule deprecations #Rule removals #Thank you! #Sort: