Ruff: Python linter and code formatter written in Rust

github.com

176 points · modinfo · 11 hours ago


112 comments
scosman · 9 hours ago
Being new to python, the astral stuff is such a relief.

I don’t think experienced python folks realize how much the flexible tooling slows people down, and creates friction for adopters. Setting up my project I tried 3 environment managers, 2 type checkers, 3 formatters/linters, 3 packagers/dependancy/project managers.

I know this is kinda the n+1 issue where astral is just adding another. But it feels like a complete and well designed stack, not a box of parts encouraging me to build my own. Reminds me a bit of go tooling.

I am a convert. I’ll happily jump on their type checker and packager when ready.

Show replies

danpalmer · 10 hours ago
I'm a little sad that Ruff took off as a re-implementation of a whole bunch of work that was already done, rather than as a project to improve the work that was already done.

It was nice to be able to write little extra linters or flake8 plugins in the language I was linting. Plus decades of effort had gone into making those plugins pretty great, finding the right separation of linting codes so that the right things could be linted/ignored per codebase.

I understand why they did it, and they have done it remarkably well, but "rewrite it from scratch" is almost never the best answer and part of me wonders if this result could have been even better achieved another way.

Show replies

JohnScolaro · 25 minutes ago
I first attempted to use ruff for a small project ~2 years ago, and at the time felt that it wasn't quite good enough to replace the: black+isort+whatever linter combo we were using at work.

I've used it a few times since then and now I'm a big proponent of using only ruff. I think most of its value comes from:

1. Being fast (or at least fast enough that it's not annoying). 2. Replaces the linting/formatting combo of multiple tools, reducing the cognitive load for the developer.

Anyway, big fan.

rikthevik · 10 hours ago
I'm very impressed by the recent developer experience improvements in the python ecosystem. Between ruff, uv, and https://github.com/gauge-sh/tach we'll be able to keep our django monolith going for a long time.

Any opinions about the current state of the art type checker?

Show replies

throwaway98231 · 11 hours ago
At this point I think even people trapped for two years on the International Space Station have heard about the Astral toolchain.

Show replies