HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
astral-sh
ruff
Rust2022–2026
astral-sh / ruff

ruff

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

68Distinct people
79Mentions
2Explicit recommenders
51.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love Ruff and I'm glad that Charlie and the rest of the team are able to work on such tools full-time. I'm also happy to see that the author of Maturin (Rust+Python interop)…

akprasad used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year79 dated mentions

Observed mentions: 2022-08-30 18:10:15 UTC to 2026-10-26 19:35:38 UTC.

01020302022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 31 mentions; 3 submissions, 28 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 23 mentions; 2 submissions, 21 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC624
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC31328
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC918
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC23221
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC1019

From the project README

An excerpt from the repository, fetched Nov 12, 2026.

Read the project’s introduction
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. Getting Started Configuration Rules Contributing Support Acknowledgements Show Your Support License Getting Started For more, see the documentation. Installation Ruff is available as ruff on PyPI. Invoke Ruff directly with uvx: uvx ruff@0.17.3 check # Lint all files in the current directory. uvx ruff@0.17.3 format # Format all files in the current directory. Or install Ruff with uv (recommended), pip, or pipx: # With uv. uv tool install ruff@latest # Install Ruff globally. uv add --dev ruff # Or add Ruff to your project. # With pip. pip install ruff # With pipx. pipx install ruff Starting with version 0.5.0, Ruff can be installed with our standalone installers: # On macOS and Linux. curl -LsSf https://astral.sh/ruff/install.sh | sh # On Windows. powershell -c "irm https://astral.sh/ruff/install.ps1 | iex" # For a specific version. curl -LsSf https://astral.sh/ruff/0.17.3/install.sh | sh powershell -c "irm https://astral.sh/ruff/0.17.3/install.ps1 | iex" You can also install Ruff via Homebrew, Conda, and with a variety of other package managers. Usage To run Ruff as a linter, try any of the following: ruff check # Lint all files in the current directory (and any subdirectories). ruff check path/to/code/ # Lint all files in `/path/to/code` (and any subdirectories). ruff check path/to/code/*.py # Lint all `.py` files in `/path/to/code`. ruff check path/to/code/to/file.py # Lint `file.py`. ruff check @arguments.txt # Lint using an input file, treating its contents as newline-delimited command-line arguments. Or, to run Ruff as a formatter: ruff format # Format all files in the current directory (and any subdirectories). ruff format path/to/code/ # Format all files in `/path/to/code` (and any subdirectories). ruff format path/to/code/*.py # Format all `.py` files in `/path/to/code`. ruff format path/to/code/to/file.py # Format `file.py`. ruff format @arguments.txt # Format using an input file, treating its contents as newline-delimited command-line arguments. Ruff can also be used as a pre-commit hook via ruff-pre-commit: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.17.3 hooks: # Run the linter. - id: ruff-check args: [ --fix ] # Run the formatter. - id: ruff-format Ruff can also be used as a VS Code extension or with various other editors. Ruff can also be used as a GitHub Action via ruff-action: name: Ruff on: [ push, pull_request ] jobs: ruff: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/ruff-action@v3 Configuration Ruff can be configured through a pyproject.toml, ruff.toml, or .ruff.toml file (see: Configuration, or Settings for a complete list of all configuration options). For the complete list of enabled rules, see Default Rules. If left unspecified, Ruff's default configuration is equivalent to the following ruff.toml file: # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".ipynb_checkpoints", ".mypy_cache", ".nox", ".pants.d", ".pyenv", ".pytest_cache", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", ".vscode", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "site-packages",
Read the full README on GitHub

What Hacker News says

79 sources
Note that Python supports type annotations in its syntax, but the interpreter will just ignore them as they are meant to be used by external tools such as ruff: https://github.com/astral-sh/ruff I've had a good experience developing small to medium sized Python programs/scripts using type annotations plus ruff connected to my editor through its LSP (Language Server Protocol). It helps a lot, and I don't like to write Python without it. You can create types from literal values and use union types, which I feel makes it more pleasant than Go's type system for example.
In TypeScript 7
ruff probably does. Docs for ruff_python_ast: https://docs.rs/littrs-ruff-python-ast/latest/ruff_python_as... src: ruff/crates/ruff_python_ast: https://github.com/astral-sh/ruff/tree/main/crates/ruff_pyth... ast.toml, generate.py, Cargo.toml, src/ https://github.com/astral-sh/ruff/blob/main/crates/ruff_pyth... Just rewrote docutils and myst-md-parser in rust with byte-for-byte equivalent output the other day; as westurner/dsport/src/docutilsrs and sphinxdocrs and so on. Pygmentsrs required fancy-regex because rust regex is linear. rstest and cargo-insta helped. PyCQA/docformatter https://github.com/PyCQA/docformatter and https://github.com/PyCQA/doc8 would be useful in rust, too. This from the other day: "A benchmark for catching when code doesn't do what its documentation claims"; docs fidelity evals https://news.ycombinator.com/item?id
Read the rest
In Making ast.walk 220x Faster
> Are people making user facing apps in rust with uis? We are talking not only about Rust, but also about C and C++. There are lots of C++ UI applications. Rust poses itself as an alternative to C++, so it is definitely intended to be used for UI applications too - it was created to write a browser! At work I am using tools such as uv [1] and ruff [2], which are user-facing (although not GUI), and I definitely appreciate a 16x speedup if possible. [1] https://github.com/astral-sh/uv [2]https://github.com/astral-sh/ruff
In Is Rust faster than C?
Glad you like it. I used rust 'cause of Ruff. They have an outstanding set of crates https://github.com/astral-sh/ruff/tree/main/crates The ones I use: - python_parser, allows me to load the python source code and detect any parsing errors (returned to the frontend) - python_ast, allows me to extract the identifiers (variable names, function names, etc) - python_semantic, allows to do scope analysis and understand relationships between identifiers In the first prototype I used Python's ast and symtable libs. However, I really wanted to rely on the speed of Ruff's implementation and Rust's speed.
In Show HN: Weft – A reactive and interactive Python experience
There was a hang/performance bug [1, 2] that was reported just after the beta release, which we've since fixed [3]. You might try seeing if we get through your entire project now? (And as an aside, there _is_ a verbose mode: if you add `-vv` you'll get DEBUG-level log messages printing out the name of each file as we start to check it, and you can set TY_MAX_PARALLELISM=1 in your env to make it very clear which file is causing the hang. That's how we debug these kinds of issues when they're reported to us.) [1] https://github.com/astral-sh/ty/issues/1968 [2] https://github.com/astral-sh/ty/issues/1993 [3] https://github.com/astral-sh/ruff/pull/22030
In Announcing the Beta release of ty
Yes, we love TypeForm! We plan to support it as soon as the PEP for it lands. Under the covers, we already support much of what's needed, and use it for some of our special-cased functions like `ty_extensions.is_equivalent_to` [1,2]. TypeForm proper has been lower on the priority list mostly because we have a large enough backlog as it is, and that lets us wait to make sure there aren't any last-minute changes to the syntax. [1] https://github.com/astral-sh/ruff/blob/0bd7a94c2732c232cc142... [2] https://github.com/astral-sh/ruff/blob/0bd7a94c2732c232cc142...
In Announcing the Beta release of ty

Showing the 15 most recent of 79 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.