Ruff v0.16.0 Launches with 413 Default Rules and New Markdown Formatting
Ruff v0.16.0 – Significant new updates – 413 default rules up from 59

I am thrilled to announce Ruff v0.16.0, which dramatically expands our default rule set from 59 to 413 to catch severe issues without extra configuration. This release introduces native formatting for Python code blocks in Markdown files, new suppression comment styles, and visible fix diffs in our standard output. We have also stabilized several key rules and behaviors previously available only in preview mode, making Ruff faster and more comprehensive than ever.
Ruff can be used to replace Black, Flake8, isort, pydocstyle, pyupgrade, and more, all while executing tens or hundreds of times faster than any individual tool.
- nickjj
I updated a ~3k line Python project with this the other day. I was using v0.15.x beforehand. It didn't take too long and the new rules do improve code quality. It caught quite a few things previous versions didn't.
Here's a few commits of changes:
(A whole bunch of manual changes based on its suggestions) https://github.com/nickjj/plutus/commit/9af66d31f98bef841588...
(Re-enable line length) https://github.com/nickjj/plutus/commit/21789f89bbcee37913c1...
(Force _ prefix for unused variables) https://github.com/nickjj/plutus/commit/a272c77b932e1c78558a...
(Auto-corrected by Ruff) https://github.com/nickjj/plutus/commit/6fe69cf88385ebdf9b8c...
- maratc
The amount of fascination that people have with these "grammar nazi" bots -- some of them implementing completely arbitrary "rules" and some of them disagreeing with others on what "good" Python code should look like -- doesn't stop to amaze me.
Here's "bad" code:
important_numbers = {
'x': 3,
'y': 42, # Answer to the Ultimate Question!
'z': 2
}
Here's what "good" code should look like:
important_numbers = {"x": 3, "y": 42, "z": 2} # Answer to the Ultimate Question!
Which completely misses the writer's intent. But did you notice that there are two spaces before the pound now? Also, the quotes are now double because apparently it's somehow more kosher! So much improvement!
The actual problems in the code I work with are not the spaces at the end of line or imports in non-alphabetic order, it's the 10-line list comprehensions that are so long that they're impossible for me to parse. None of these tools catch that. My place used pylint, flake8, black, ruff -- with hundreds of commits on every change. All that energy could be better spent elsewhere.
- woadwarrior01
Great to see ruff, ty and uv being actively developed, even after Astral was acquired by OpenAI.
- gempir
I wish Go had something like Ruff! A lot of languages are getting amazing tool but Go has a very fragmented ecosystem with a lot of tools but none of them feel as high quality has the likes of Ruff, Oxc, Biome or even PHP's Mago
- jon-wood
I really wish Ruff would introduce something similar to Nix’s stateVersion, which is used to determine the set of defaults that will be applied. Updating Ruff at a scale beyond a single repo is a bit of a crapshoot currently, with every version introducing a bunch of new default rules which you then have to deal with immediately (either by turning them off or fixing them).
I’m aware we could have an allowlist in place which specifies all rules that are turned on but I’d much rather have a simpler config file, and be able to bump the state version at a good time for everyone to spend a few hours fixing new violations.
- hyeongjun
Good news. enabling 413 rules by default means most projects get useful linting without touching the config at all!
- kstenerud
This is great news! With the advent of agentic coding, strong linting is more important than ever. What I'd really like to see is forbidigo for more languages.
- luciana1u
413 rules and somehow every codebase I join still has the same three arguments about import sorting