Skip to main content

Ruff 0.17.4

Release Date: November 5, 2026

Ruff 0.17.4 shipped on November 5, 2026, and it behaves exactly like a patch release: a couple of crash fixes, an autofix that stopped rewriting code it should not have touched, and nine performance patches you will never notice individually. Skepticism is warranted before you turn on the preview rules, but the stability work is real.

  • G004 autofix no longer changes behavior — The flake8-logging-format fix could alter runtime behavior and produce syntax errors; both are addressed, so the fix is safe to apply again (#27419).
  • New preview rule tarfile-ignore-zeros-true — A security rule that flags tarfile.open() calls relying on the default zero-block handling, which can silently truncate archives (#28680).
  • BOM-prefixed files no longer panic — The diagnostic renderer used to crash on files starting with a byte-order mark; it now renders diagnostics normally (#30017).
  • Bare raise before a semicolon parses — A regression that rejected raise followed by ; is fixed, along with match identifiers appearing after a semicolon (#29761, #29760).
  • SIM102 reaches more cases — Collapsible elif clauses following an if branch with multiple statements are now reported by flake8-simplify (#29814).
  • Readable fix diffs — More nonprinting characters are shown in diagnostic diffs instead of being rendered invisibly, which makes whitespace bugs far easier to spot (#30062).
  • Formatter throughput — Source slices are coalesced when formatting attributes, formatter source-slice overhead is reduced, node fields are written directly when comment handling is unnecessary, and a Bloom filter now handles formatter comment lookups (#29841, #29855, #29853, #29852).
  • Linter throughput — Return statements are collected with a statement-only visitor, callee qualified names are reused across rules, pyflakes defers value comparisons for repeated dictionary keys (F601, F602), and ordinary writes use a concrete buffer (#29911, #29916, #29739, #29819).
  • Color handling follows the spec — NO_COLOR now takes precedence and CLICOLOR=0 is honored in both Ruff and ty diagnostics (#29898, #29910).
  • Stricter __debug__ checks — The syntax-error check for writes to __debug__ now covers attribute targets as well (#27908).

Upgrade with uv tool upgrade ruff or pip install -U ruff==0.17.4, then run ruff check --preview on a branch before committing to the new rules.

Other Versions

We use cookies for ads and analytics.