Early Explorations of Astral's Red Knot Type Checker
April 3, 2025
Update (May 5, 2025): Red Knot has been renamed ty.
A recent blog post by Michael Jurasovic explores Astral’s upcoming static type checker, Red Knot. The tool is under active development with an alpha release targeted for PyCon 2025.
Findings
- Build Process: The author used Claude to analyze the Ruff codebase and successfully compiled Red Knot from source using Cargo
- Configuration: Red Knot uses a
[tool.knot]section inpyproject.tomlfor configuration - Performance: Initial benchmarks showed Red Knot running approximately 100x faster than mypy on cold starts
- Stability: As expected for pre-release software, there were some crashes on larger codebases (SQLAlchemy, mypy) and numerous errors on others
Red Knot runs approximately 100x faster than mypy on cold starts. The tool still crashes on some larger codebases and produces errors on others, but the speed gains suggest Red Knot could change how Python developers approach type checking.
Last updated on