Skip to content
Rush Commerce
Tools & Teardowns3 min read

Ruff 0.16 ships 413 default rules — pin before you upgrade

Ruff v0.16.0 raises the default rule set from 59 rules to 413 and formats Python in Markdown. Great defaults, and a very loud first CI run.

Ruff just changed its default rule set for the first time since v0.1.0, and it's not a nudge. Ruff v0.16.0 enables 413 rules by default, up from 59. If you adopted Ruff by running ruff check with no config — which is most teams, because that's the pitch — your next CI run produces roughly seven times the rule surface it did last week. The new defaults are better. The upgrade still needs ten minutes of planning instead of a dependabot merge.

What actually happened

Astral shipped Ruff v0.16.0 on July 23, 2026. The headline breaking change is the default select set jumping from 59 rules to 413, out of 968 total. For context on how long that default sat still: when it was set in v0.1.0, Ruff had 708 rules in the catalog. The project now publishes a Default Rules page listing exactly what's on.

Opting out is one config block, and it's worth writing down because it's the migration escape hatch:

[lint]
select = ["E4", "E7", "E9", "F"]

That restores the old behavior exactly. The rest of the release:

  • Markdown code blocks now get formatted by default — fenced ```python, py, py3, pyi, and pycon blocks. Suppress with fmt: off/fmt: on or HTML comment pairs.
  • New suppression syntax: ruff: ignore, ruff: disable/enable, and ruff: file-ignore, all of which accept an explanatory reason. There's an --add-ignore CLI flag that writes the suppression comments for you.
  • Fix diffs render inline in check and format --check output — no more --diff round trip to see what a fix would do.
  • JSON output breaking change: filename, location, end_location, and fix edit locations can now be null instead of empty strings or default positions. If you parse Ruff's JSON in tooling, that's your line to check.
  • Twelve preview rules stabilized, covering Airflow compatibility and copyright headers among others.

Why the Ruff default change matters for your build

The trap isn't the rules. It's the ordering. Upgrade Ruff and the new defaults land in the same commit as whatever feature you were shipping, your PR turns red with a few thousand findings across files nobody touched, and the fastest path back to green is to pin select to the old four and never revisit it. That's the worst outcome — you took the breakage and threw away the benefit.

Do it as its own change instead. Pin the old select block, upgrade Ruff, confirm CI is green, then merge that. Now flip to the new defaults in a separate branch and look at what it actually found. Use --add-ignore to bulk-suppress the noise in legacy files with a reason attached, so the suppressions are reviewable rather than invisible. Land the autofixes as a formatting-only commit and add it to .git-blame-ignore-revs.

Two smaller things worth catching. The Markdown formatter is on by default, so if your repo has docs with Python snippets that are deliberately non-idiomatic — teaching examples, bad-then-good comparisons — they'll get reformatted. And if anything downstream consumes ruff --output-format json, the nullable fields will surface as a NoneType error at the least convenient moment.

Better defaults are worth having. Just don't let them arrive uninvited on a Friday deploy.

Key takeaways

  • Ruff v0.16.0 (July 23, 2026) enables 413 default rules, up from 59 — the first default change since v0.1.0
  • Restore the old behavior with select = ["E4", "E7", "E9", "F"], then adopt the new defaults as a separate, deliberate change
  • Markdown Python code blocks are now formatted by default; suppress with fmt: off where examples are intentionally non-idiomatic
  • JSON output fields can now be null — check any tooling that parses --output-format json

Upgrades like this are cheap when your pipeline is set up for them and expensive when it isn't. We build CI that separates tooling changes from feature work, so a linter bumping its defaults costs you an afternoon instead of a sprint. See how we work.

Sources: Astral, Ruff releases on GitHub.

  • #ruff
  • #python
  • #linting
  • #ci-cd
  • #developer-tools
TR

Tommy Rush — Founder, Rush Commerce

Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More

Get The Rush Report weekly — one email, zero fluff.