Open-Source Wikis

/

Ruff

/

Lore

astral-sh/ruff

Lore

A timeline of how this codebase grew from a 2022 weekend prototype into a full Python toolchain. Dates are derived from git history.

Eras

Aug 2022 – The prototype

The very first commit (Initial commit for linter prototype, August 2022) lays down a tiny Rust project with a nascent linter loop. The original tagline — "ruff: an extremely fast Python linter, written in Rust" — was the entirety of the README. A handful of checks landed in the first month: error messages, multiple files, the first noqa parser.

Charlie Marsh's project announcement at https://notes.crmarsh.com/python-tooling-could-be-much-much-faster argued that Python tooling could be 10–100× faster, and the early prototype was the proof.

Late 2022 – Flake8 catch-up

The project quickly started to absorb popular Flake8 plugins. Pyflakes (F) and pycodestyle (E/W) were the first targets, then bugbear, comprehensions, simplify, and isort. By the end of 2022 Ruff had ~1,400 commits and the foundational structure that still exists today: crates/ruff_linter/src/rules/<plugin_name>/rules/<rule_name>.rs.

Q1 2023 – The formatter project starts

The first commit to crates/ruff_python_formatter is Add initial formatter implementation (February 2023). Built on a fork of Rome's rome_formatter, it took roughly nine months from prototype to "Black-compatible" stable release. The formatter team made a deliberate stylistic decision to match Black's output by default, which shows up in the formatter snapshot test corpus and in the Black-divergence tracker.

Mid 2023 – New parser

crates/ruff_python_parser was rebooted as a fully handwritten parser in July–August 2023, replacing an earlier RustPython-derived parser. The new parser is permissive (it can recover from missing colons, dangling commas) and gives Ruff a parser independent of upstream churn.

Q1 2024 – LSP server

ruff server — Ruff's built-in Language Server Protocol implementation in Rust — landed in March 2024 (crates/ruff_server). It replaced the previous Python-based ruff-lsp and made editor integration a first-party concern. VS Code, Neovim, JetBrains, and Zed all hook into it via the astral-sh/ruff-vscode extension and the LSP.

Apr 2024 – ty (formerly red_knot) is kicked off

The first commit of what became ty appears in April 2024 under the name red-knot: Kick off Red-knot (#10849). The goal was an extremely fast Python type checker that reuses Ruff's parser and AST. Early commits introduce program.check, class-vs-instance distinctions, dependency resolution, and the Salsa-based database layer.

2025 – ty matures and is renamed

Across 2025, ty accumulated thousands of commits implementing Python's type system: protocols, generics, type narrowing, ParamSpec, TypeVar variance, gradual types, type guards, and an ever-growing mdtest corpus. The project was renamed from red_knot to ty, and crates/ty/ and crates/ty_python_semantic/ became the largest fast-moving areas of the repo. By mid-2025 ty had its own LSP server (crates/ty_server) and a WASM playground.

2026 – Steady-state polish

The first four months of 2026 averaged ~415 commits per month. The work mix is: ty type system corner cases, ruff lint-rule additions and false-positive fixes, a steady cadence of release commits (Ruff is on a fortnightly release schedule), playground polish, and IDE features (renames, completions, hover, go-to-definition).

Longest-standing modules

Subsystem First commit Notes
crates/ruff_linter/src/rules/pyflakes Aug 2022 Some of the original checks (F401, F811, F841) survive with regular tweaks.
crates/ruff_linter/src/registry.rs Aug 2022 The rule registry has been refactored several times but kept the same shape.
crates/ruff_linter/src/noqa.rs Aug 2022 The # noqa parser is one of the oldest files; still actively maintained.
crates/ruff_text_size 2022 Forked from text-size, used everywhere.

Major rewrites

  • Parser, mid-2023. Replaced an external dependency with a handwritten parser. See crates/ruff_python_parser/CHANGELOG and PRs around July–August 2023.
  • Diagnostic renderer, 2023–2024. Forked annotate-snippets-rs into crates/ruff_annotate_snippets to gain finer control over output formatting and color rendering.
  • Cache + workspace, 2023. Multiple rounds of work to make per-file caching robust, and to share cached results across ruff check and ruff format.
  • red_knotty rename, 2025. Same code, new public name. Old commit messages still mention "red-knot".

Deprecated or replaced

  • ruff-lsp (Python) — superseded by the in-repo ruff_server (March 2024). The standalone Python LSP is now a thin compatibility shim.
  • The original RustPython-derived parser — replaced by the handwritten parser in 2023.
  • A subset of pycodestyle stylistic rules — disabled by default in modern presets when the formatter is in use, since the formatter handles them.

Growth trajectory

The project went from a one-developer prototype to a tool used by Apache Airflow, FastAPI, Pandas, SciPy, PyTorch, Hugging Face, Mypy, pip, and many more (see the README's "Who's Using Ruff" list). 15,000+ commits, 49 crates, ~900 lint rules, two language servers, and a typed-up sibling project (ty) — all in less than four years.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Ruff wiki | Factory