Ruff v0.9.0
read at source ↗ astral.sh
Ruff v0.9.0
Source: Astral Date: 2025-01-09 URL: https://astral.sh/blog/ruff-v0.9.0
Summary
Ruff v0.9.0 ships the Ruff 2025 Style Guide — f-string expression formatting (spacing, quote normalization, unnecessary escape removal), implicit string concatenation merging when lines fit, and match-case guard parenthesization. Seven lint rules promoted from preview to stable including A005 (stdlib module shadowing), FURB188 (slice prefix/suffix removal), and RUF034 (useless if-else).
Implications
F-string formatting is the last major Python syntax Black never fully touched. Black treats f-string interiors as opaque; Ruff 2025 formats them. This is both a correctness and consistency win — f-strings in modern Python codebases are pervasive, and unformatted expressions inside them were a visible gap when comparing Ruff output to hand-edited code. Implicit string concatenation merging is the other notable bet: Black’s stance was to always preserve programmer intent on multi-line strings; Ruff is more aggressive about collapsing them when safe. These are genuine divergences from Black, not just speed improvements on the same decisions.