49.6k stars · MIT · 0.16.8 (2026-09-16), read from /releases/latest, which printed the year explicitly · Track this in Scout
One fast program that both checks and formats Python code, carrying the rules of Flake8, isort and pyupgrade and a formatter close to Black.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A linter and a formatter, written in Rust. A linter is a program that reads your code without running it and reports mistakes and bad habits. A formatter rewrites the spacing and line breaks so every file looks the same. Ruff carries the rules of Flake8, isort, pyupgrade and several other tools, and its formatter produces output very close to Black's.What it is good for. Any Python project, and especially one with more than a few hundred files, because the older tools take long enough on a big project that people quietly stop using them. The problem it removes is the review argument about spacing. A short line about Grasppy and ScalpingMate: both are Python, and both are written mostly by a coding assistant. An assistant produces a lot of code quickly, and this is the cheapest way to keep all of it in one style and catch the unused import it left behind.
- Fast enough to run on every file save without noticing, which is what makes it actually get used.
- One tool instead of four, so there is one configuration file and one version to keep up to date.
- MIT licence, a release most weeks, and it reads the configuration files you already have.
- Turning it on for an existing project makes one enormous commit where every file changed. Do that on its own, before anything else.
- A few rules from the older tools have no equivalent yet, so a very strict setup may not move across whole.
- It checks style and simple mistakes. It does not check types, so you still need mypy or something like it for that.
- psf/black
The formatter whose style Ruff copies, and it only formats, so a separate checker is still needed.
Track this in Scout - pylint-dev/pylint
A much deeper checker that follows the code's logic and finds problems Ruff does not, and it is far slower and licensed GPLv2.
Track this in Scout
biomejs/biomeThe same idea for JavaScript, TypeScript, CSS and JSON, published in Edition 17, and the two together cover a mixed project.
Track this in Scout
# Inside your project's virtual environment: source venv/bin/activate pip install ruff # Or system-wide on this kind of Linux: pip install ruff --break-system-packages # Then, from the project folder: ruff check . # report problems ruff check --fix . # fix the ones it can fix safely ruff format . # reformat everything
