Ruff v0.16.0: Default Rule Set Jumps From 59 to 413
Source: Astral — 2026-07-23
Summary
Astral shipped Ruff v0.16.0, a major release for the Python linter/formatter that expands the default-enabled rule set from 59 rules to 413 (while removing 18 opinionated pycodestyle/pyflakes rules like E402, E711-E714, and F403). The release also adds ruff: ignore suppression comments mirroring noqa syntax, default formatting of Python code blocks embedded in Markdown files, and diff-based diagnostics for both check and format --check, including GitHub/GitLab CI output formats.
Key Takeaways
- Default-enabled rules jump roughly 7x, from 59 to 413, meaning most existing projects will surface many new diagnostics on upgrade without any config changes; Astral removed 18 more opinionated rules (
E401,E402,E701-E703,E711-E714,E721,E731,E741-E743,F403,F405-F406,F722) as part of the rebalance. - New
ruff: ignoresuppression comments work likenoqabut with Ruff's own syntax, usable at the end of a line or on the line preceding a diagnostic (e.g.import math # ruff: ignore[F401]). - The formatter now reformats Python code blocks embedded in Markdown files by default (recognizing
python,py,python3,py3,pyi, andpyconinfo strings), withpyiblocks formatted as stub files andpyconblocks as REPL sessions; teams that don't want this can exclude*.mdviaextend-exclude. - Both
ruff checkandruff format --checknow show diffs of proposed changes directly in the CLI output, andformat --checkgainedgithubandgitlaboutput formats for CI integration. - JSON output now allows
nullfor fields likefilename,location, andend_locationinstead of defaulting to empty strings, and 12 previously preview rules stabilized, includingCPY001(copyright notice checks) andRUF036(union type ordering).
Discussion
(No questions yet — ask follow-ups via a Claude Code chat session on this repo; answers get appended here.)