Astral has released Ruff 0.16, widening the Python tool’s default linting coverage from 59 rules to 413 while adding formatting and diagnostic features. The company said the version contains relatively few breaking changes for most users, with the expanded defaults the principal exception.
Ruff is a Rust-based Python linter and formatter intended to consolidate work commonly handled by tools including Black, Flake8 plugins, isort, pydocstyle and pyupgrade. Its overall catalogue has grown from 708 rules when the defaults were last changed in version 0.1.0 to 968 rules in the new release.
The larger default selection includes checks for syntax problems and immediate runtime errors, as well as rules from flake8-bugbear, pyupgrade and Ruff’s own RUF category. Astral also removed 18 more opinionated pycodestyle and pyflakes rules from the default set. Projects that need the previous behavior can explicitly select the old collection in their configuration. Existing users should therefore review the newly enabled diagnostics before adopting the release in automated checks.
Ruff 0.16 can also format Python code embedded in Markdown. It recognizes fenced blocks labelled `python`, `py`, `python3`, `py3`, `pyi` or `pycon`, applying specialized handling for stubs and interactive sessions. Quarto code blocks are supported when their language label appears within braces, though projects using the `.qmd` suffix may need an extension mapping. Users can disable formatting for individual regions or exclude Markdown files through configuration.
The release extends Ruff’s suppression system with standalone comments. A `ruff: ignore` directive can suppress a diagnostic on the same line or the following logical line, while `ruff: file-ignore` applies across an entire file. Both can include a human-readable reason, and the command-line tool can add ignore comments automatically. In preview mode, the comments can refer to rule names rather than only codes.
Diagnostic rendering has changed as well. Ruff now displays proposed linter and formatter fixes as diffs within its normal full output, alongside explanatory diagnostics. The formatter’s check mode gains the output formats already available to the linter, including machine-readable JSON and formats designed for GitHub and GitLab annotations.
One small compatibility change affects JSON consumers: filename and location-related fields may now be `null` instead of placeholder empty strings or default row-and-column values. Astral said the representation better matches Ruff’s internal diagnostics and could appear in more rules later.
Several previously preview-only rules and behaviors have also been stabilized. Taken together, version 0.16 shifts more error detection into the out-of-the-box configuration while broadening Ruff’s role beyond Python source files. Teams that pin lint output or parse JSON diagnostics will have the clearest migration work: assess the expanded rules and ensure downstream tooling accepts nullable location fields.


