Type Checking
Python’s type-checking landscape has three serious players (mypy, ty, Pyright) and several supporting tools. The handbook explains how each one works, when to choose which, and how to adopt typing without rewriting your codebase.
Pick a type checker
Adopt type checking
More Type Checking pages
Everything else tagged type-checking, grouped by section. Pages featured above are not repeated here.
How To
Explanation
Reference
From the blog
Posts tagged type-checking.
-
ty and pyrefly find different bugs
Running ty 0.0.32 and pyrefly 0.62.0 on Textualize/rich raised 49 errors from ty and 20 from pyrefly. The 2.5x gap mostly disappears once you account for how each tool handles `# type: ignore` comments. Each tool also catches real bugs the other misses.
-
Migrating from mypy to ty: Lessons from FastAPI
Sebastián Ramírez has adopted ty across FastAPI, Typer, SQLModel, and more. His incremental migration strategy reveals the practical realities of switching type checkers on mature codebases.
-
Seven Claude Code Skills for Python from the Creator of spaCy
Matthew Honnibal's Claude Code skills collection covers type annotations, error handling, property-based testing, and mutation testing.
-
ty is Built with AI
Charlie Marsh and Boris Cherny are building their Python tools with Claude Code, demonstrating AI-assisted open source development.
-
ty: Astral's New Python Type Checker Released
Astral releases ty, a Rust-based Python type checker that's 20x faster than mypy with advanced type narrowing and incremental checking.
-
Analysis of the New Wave of Python Type Checkers
Rob Hand compares three Rust-based Python type checkers: ty (Astral), pyrefly (Meta), and zuban, covering performance and tradeoffs.
-
Google Sunsets Pytype: The End of an Era for Python Type Checking
Google ends Pytype support after Python 3.12. The bytecode-based type checker couldn't keep up with modern typing and IDE requirements.
-
ty's Breakthrough: Why Incremental Analysis Matters for Python
Charlie Marsh explains ty's incremental analysis system that recomputes only affected code when files change, from file-level to function-level.
-
Comparison of the Two New Typecheckers
Comparing ty and Pyrefly, two new Rust-based Python type checkers demonstrated at PyCon 2025's Typing Summit.
-
Pyrefly: Meta's New Type Checker for Python
Meta releases Pyrefly, a Rust-based Python type checker with a new inference engine designed for large codebases.
-
Early Explorations of Astral's Red Knot Type Checker
Early benchmarks of Astral's Red Knot (now ty) type checker show 100x faster cold starts than mypy, built in Rust.
-
It's happening! A Python Type Checker from Astral
Astral announces a Rust-based Python type checker focused on performance and minimizing false positives on untyped code.
-
Effective Python Developer Tooling in December 2024
An opinionated guide to Python developer tooling covering uv, ruff, pytest, mypy, and principles for productive Python development.