Skip to content
Commitpedia
Log in Join & edit

Ruff: Python linter and formatter

Ruff is a fast Python linter and code formatter written in Rust. It catches bugs such as undefined names and unused imports before you run your code.

Not checked by a trusted editor yet Last edited Outdated?

Edit history of Ruff: Python linter and formatter: 1 recorded edit
Edit history · 1 edit
Type
Repo
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Source
astral-sh/ruff

astral-sh/ruff

Stars
50.1k
Forks
2.5k
Language
Rust
Licence
MIT
Last push
15 Oct 2026

On GitHub: An extremely fast Python linter and code formatter, written in Rust.

Open on GitHub

Ruff reads your source files without running them and reports problems: names that are never defined, imports that are never used, variables that shadow built-ins, risky patterns and style issues. It reimplements rules from many established tools, including Flake8 and its popular plugins, isort and pyupgrade, and ruff format provides a formatter designed to match Black’s output. Many issues can be fixed automatically with ruff check --fix.

Use it on every project: run ruff check . and ruff format . locally, in a pre-commit hook and in CI. Rules are enabled and configured in pyproject.toml under [tool.ruff]. Editor integrations show problems as you type, which turns many runtime errors into red underlines.

A linter complements tests rather than replacing them: Ruff finds mistakes visible in the code itself, while pytest checks behavior. Together with a type checker they catch a large share of the errors described in the Common errors section, such as calling methods on values that may be None.

See also

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Commitpedia +1,013 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?