An extremely fast Python linter and code formatter written in Rust, offering drop-in replacements for tools like Flake8 and Black.
Ruff is an extremely fast Python linter and code formatter written in Rust. It combines the functionality of multiple standalone tools like Flake8, Black, and isort into a single, high-performance package, solving the problem of slow, fragmented Python tooling by offering a unified and speedy alternative.
Python developers and teams working on projects of any size, especially those with large codebases or who prioritize fast CI/CD pipelines and developer tooling performance.
Developers choose Ruff for its unmatched speed, which is 10-100x faster than traditional tools, and its ability to replace a dozen+ linters and formatters with one tool, simplifying configuration and improving workflow efficiency.
An extremely fast Python linter and code formatter, written in Rust.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Ruff is 10-100x faster than Flake8 and Black, as evidenced by benchmarks linting the CPython codebase from scratch in seconds, drastically reducing CI times.
It replaces multiple standalone tools like Flake8, isort, and Black with a single `ruff` command, simplifying dependencies and configuration in `pyproject.toml`.
With over 900 built-in rules, including native re-implementations of popular Flake8 plugins, Ruff offers comprehensive linting without external plugins.
Ruff provides fix support for issues like unused imports, enabling automatic error correction with the `--fix` flag to streamline refactoring.
New features and rules are gated behind an unstable preview mode that may change before stabilization, risking breakage in production workflows.
While Ruff re-implements many Flake8 plugins, some like flake8-bandit are listed as in-progress, leaving gaps for security-focused linting.
As a fast-evolving project, frequent updates can introduce breaking changes, requiring careful version pinning and migration effort.
ruff is an open-source alternative to the following products:
Flake8 is a Python linting tool that combines PyFlakes, pycodestyle, and McCabe complexity checker to enforce code quality and style consistency.
pyupgrade is a tool that automatically upgrades Python syntax to newer versions, helping modernize code by applying language features from newer Python releases.
pydocstyle is a static analysis tool for Python that checks compliance with PEP 257 docstring conventions and style guidelines.
isort is a Python utility/library that sorts imports alphabetically and automatically separates them into sections and by type.
Black is an uncompromising Python code formatter that automatically reformats code to comply with its style guidelines.
autoflake is a Python command-line tool that removes unused imports and variables from Python code to help maintain clean and efficient codebases. It is often used as a pre-commit hook or in CI pipelines.