51,148
stars
+21
2,640
forks
158
watchers
20,708
prs
8,445
issues
435
releases
468
discussions
README
Ruff
Docs | Playground
An extremely fast Python linter and code formatter, written in Rust.
Linting the CPython codebase from scratch.
- ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)
- 🐍 Installable via pip
- 🛠️ pyproject.toml support
- 🤝 Python 3.15 compatibility
- ⚖️ Drop-in parity with Flake8, isort, and Black
- 📦 Built-in caching, to avoid re-analyzing unchanged files
- 🔧 Fix support, for automatic error correction (e.g., automatically remove unused imports)
- 📏 Over 900 built-in rules, with native re-implementations
of popular Flake8 plugins, like flake8-bugbear
- ⌨️ First-party editor integrations for VS Code and more
- 🌎 Monorepo-friendly, with hierarchical and cascading configuration
Ruff aims to be orders of magnitude faster than alternative tools while integrating more
functionality behind a single, common interface.
Ruff can be used to replace Flake8 (plus dozens of plugins),
Black, isort,
pydocstyle, pyupgrade,
autoflake, and more, all while executing tens or hundreds of
times faster than any individual tool.
Ruff is actively developed and used in major open-source projects like:
- Apache Airflow
- Apache Superset
- FastAPI
- Hugging Face
- Pandas
- SciPy
Ruff is backed by Astral, the creators of
uv and ty.
Read the launch
post, or the
original project
announcement.
Testimonials
Sebastián Ramírez, creator
of FastAPI:
Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually
running and checking the code.
Nick Schrock, founder of Elementl,
co-creator of GraphQL:
Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On
our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4
cores on my M1. Running ruff against our _entire_ codebase takes .4 seconds.
Bryan Van de Ven, co-creator
of Bokeh, original author
of Conda:
Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of
~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added
it as an actual commit hook, which is terrific.
Timothy Crosley,
creator of isort:
Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe
it was working till I intentionally introduced some errors.
Tim Abbott, lead developer of Zulip (also here):
This is just ridiculously fast... ruff is amazing.
Table of Contents
For more, see the documentation.
1. Getting Started
1. Configuration
1. Rules
1. Contributing
1. Support
1. Acknowledgements
1. Show Your Support
1. License
Getting Started
For more, see the documentation.
Installation
Ruff is available as ruff on PyPI.
Invoke Ruff directly with uvx:
shell
uvx [email protected] check Lint all files in the current directory.
uvx [email protected] format Format all files in the current directory.
Or install Ruff Top issues
#970Implement Pylint342 comments · 2022-11-30#283Meta issue: plugin system102 comments · 2022-09-29#2402Implement remaining `pycodestyle` rules72 comments · 2023-01-31#7684Formatter: Keep right-hanging comments aligned59 comments · 2023-09-27#659Expose Ruff's public API as a Python library50 comments · 2022-11-08#458Implement rules in `darglint`47 comments · 2022-10-21#8232Unified command for linting and formatting44 comments · 2023-10-25#9216How to use COM812 in linter but avoid conflict with formatter?42 comments · 2023-12-20
Discussions
#29646Expanding `blind-except` to contextlib.suppress1 comments · 2026-10-22#29457Rule idea: "Inline-newlines"1 comments · 2026-10-18#29122Tag v0.0.268 declares version 0.0.267 in pyproject.toml — intended?4 comments · 2026-10-05#28504VSCode extension vs ruff binary differing behaviour - how to synchronize behaviour?1 comments · 2026-09-10#28417Research inquiry: Ruff’s release approval workflow1 comments · 2026-09-08#28100astral-sh badges: uv, ty, Ruff0 comments · 2026-08-27#28098Formatter: Option for compact wrapping comma-separated constructs1 comments · 2026-08-27#27566Is there a way to use checker in preview-mode and formatter in non-preview mode for same code?2 comments · 2026-08-07
Latest release
0.17.4 0.17.4 2026-11-05Release Notes Released on 2026-11-05. Preview features - \[flake8-logging-format\] Avoid behavior changes and syntax errors in fixes (G004) (27419) - \[security\] Implement tarfile-ignore-zeros-true (28680) Bug fixes - Accept a bare raise before a semicolon (29761) - Allow match identifiers after a semicolon (29760) - Fix panic on BOM-prefixed files in diagnostic renderer (30017) - \[flake8-simplify\] Report collapsible elif clauses after a multi-statement if branch (SIM102) (29814) Rule changes - Show more nonprinting characters in diagnostic fix diffs (30062) Performance - Coale