Rationale
We use
Mypy as the main static type checker for Python source code. Mypy:
- Is an old-school Python type checker, which means it has many rules implemented and has been thoroughly tested
- Is open source
- Has a huge number of typing checks
- Supports caching already-reviewed files for performance
- Does not provide a language server out of the box, considerably affecting development experience
- Integrates in-editor typing using its VS Code extension for development experience
- As it is built in Python, it has serious performance limitations
Alternatives
Below are alternatives we are currently considering as possible replacements to Mypy.
Ty
- Ty is a static type checker developed by Astral, creators of uv and Ruff; it is still under development
- Is open source
- Does not have as many typing checks as Mypy
- Although it currently does not support caching, it is still much faster compared to Mypy
- Provides a language server out of the box, considerably improving development experience
- Integrates in-editor typing using its VS Code extension for development experience
- As it is built in Rust, it is considerably faster compared to other type checkers, up to a point where performance is no longer a concern
Ty was last reviewed on Aug 1, 2025.