Ruff: A Fast Python Linter
lwn.net
lwn.net
https://news.ycombinator.com/item?id=32666035 (46 comments)
https://news.ycombinator.com/item?id=34788020 (67 comments)
Ruff: A fast Python linter, written in Rust - https://news.ycombinator.com/item?id=34788020 - Feb 2023 (67 comments)
Ruff – a fast Python Linter written in Rust - https://news.ycombinator.com/item?id=32666035 - Aug 2022 (46 comments)
Reposts are ok when a story hasn't had significant attention in the last year or so (https://news.ycombinator.com/newsfaq.html) but as both of those threads were within the last year, the current submission counts as a dupe.
The intention behind that rule is to have a balance: it's good to re-discuss popular topics from time to time, and we also want room on the front page for lots of uncorrelated and unfamiliar things.
It's not going to replace pylint, but pylint is hard to configure and slow.
There is overlap between ruff checks and what's eliminated by black though, since ruff implemented flake8 rules first and a lot of them are PEP8 oriented.
Also, note that ruff is also a fast import sorter, faster than isort. But it's not a 1:1 match to isort (no fly to top, some formatting are different).
All in all, I would advice to use it if you are not used to linters, or if you don't feel like going full bazooka on a project.
It's has a very good cost/benefit ratio give how lighweight and easy to use it is.
Its import sorting is designed to be compatible with isort --profile=black by default (https://beta.ruff.rs/docs/faq/#how-does-ruffs-import-sorting...). Many isort settings are supported (https://beta.ruff.rs/docs/settings/#isort). I’m not sure what “fly to top” means.
It also has a very good LSP that complements pyright in my neovim setup. There's also a plug-in for pylsp if you're using an editor that doesn't support multiple LSPs at the same time (e.g. Helix).
After that, check the rules page[0] for anything that might be relevant to your project. Between enabling some of these rules, using pyright, black and sourcery, I feel like the most relevant cases are covered.