Ruff 0.16.1
Ruff 0.16.1 has been released — a patch release for the fast Python linter and code formatter, bringing rule fixes, server improvements, and preview features.
Overview
Released on July 30, 2026, Ruff 0.16.1 is a targeted update that follows the major 0.16.0 release. This patch focuses on refining rule behaviour, fixing false positives, and improving the LSP (Language Server Protocol) integration.
Preview Features
Several preview features have been added or refined:
- Human-readable names opt-out — A new option allows users to opt out of human-readable rule names, useful for teams that prefer strict code identifiers in their lint output
- PT018 fixes safe by default — flake8-pytest-style fixes are now marked safe by default, with unsafe mode only triggered when comments are present
- UP040, UP046, UP047 skip protection — pyupgrade fixes now correctly skip transformations when a defaulted TypeVar precedes a non-defaulted one, preventing invalid code generation
- RUF065 false positive fix — The ruff-specific rule for unpacked arguments no longer fires in cases where the unpacking is legitimate
Bug Fixes
- LSP resilience — The
gen-lsp-typesdependency has been bumped to gracefully handle unknown enumeration values in LSP protocol messages, meaning the language server won't crash when receiving unexpected data from editors - B008 immutability fix — flake8-bugbear's
rangeis now correctly marked as immutable, eliminating false positives in the B008 check - C408 normalization — flake8-comprehensions now NFKC-normalizes keyword names in its C408 fix, ensuring consistent behaviour across Unicode inputs
- RET504 false positive — flake8-return no longer flags a false positive when a variable is read inside a
finallyclause - RST directive detection — pydocstyle's section detection (D214, D405, D413) now correctly skips content inside RST directive bodies
- FURB192 parenthesization — The refurb rule for unnecessary yield expressions now correctly parenthesizes
yieldarguments in its fix
Rule Changes
- PT022 — flake8-pytest-style fixes are now marked as unsafe when they involve assertions in fixture teardown
- FURB105 — Refurb fixes that remove unknown separators are now correctly marked as unsafe
Server Improvements
The LSP server received two notable updates: indexing of excluded nested Ruff workspaces has been fixed (so nested workspaces within excluded directories no longer break the server), and TOML files are now linted directly in the LSP, bringing configuration file linting into your editor workflow.
Documentation and Maintenance
The documentation has been updated with better coverage of pycon Markdown formatting, flake8-bandit's TYPE_CHECKING exception (S101), flake8-import-conventions' extend-aliases override behaviour, and pylint fix safety gotchas for non-augmented-assignment (PLR6104). The underlying annotate-snippets dependency has been vendored at the latest version, and syntax error noise has been reduced by swallowing dedents in the same way indents are handled.
Ruff 0.16.1 is available now. Update via pip, uv, or your preferred package manager: pip install --upgrade ruff.