Mypy
Last updated: Oct 28, 2026
Rationale
Fluid Attacks uses Mypy as the primary static type checker for Python source code.
- It is one of the first Python type checkers. Thus, it has many implemented rules, and it is carefully tested.
- It is open source.
- It has a very large number of typing checks.
- It supports caching of reviewed files, for performance.
- It does not have a language server by default, which makes the development experience much worse.
- It integrates in-editor typing with its VS Code extension for the development experience.
- Because it is built in Python, it has serious performance limitations.
Alternatives
At this time, Fluid Attacks examines these alternatives as possible replacements for Mypy:
Ty
- Ty is a static type checker that Astral develops. Astral also made uv and Ruff. Ty is in development at this time.
- It is open source.
- It does not have as many typing checks as Mypy.
- It does not support caching at this time, but it is much faster than Mypy.
- It has a language server by default, which makes the development experience much better.
- It integrates in-editor typing with its VS Code extension for the development experience.
- Because it is built in Rust, it is much faster than other type checkers. Thus, performance is not a problem with Ty.
Fluid Attacks last reviewed Ty on Aug 1, 2025.
Pyright
- Pyright is a static type checker that Microsoft develops. After Mypy, it is the most used type checker, and it is production-ready.
- It is open source.
- It has approximately the same number of typing checks as Mypy, or possibly more.
- It does not support caching at this time, but it is much faster than Mypy.
- It has a language server by default, which makes the development experience much better.
- It integrates in-editor typing with its VS Code extension for the development experience.
- Because it is built in TypeScript, it is faster than Mypy, but slower than the Rust-based type checkers.
Fluid Attacks last reviewed Pyright on Aug 1, 2025.
Pyrefly
- Pyrefly is a static type checker that Meta develops. It is in development at this time.
- It is open source.
- It does not have as many typing checks as Mypy.
- It does not support caching at this time, but it is much faster than Mypy.
- It has a language server by default, which makes the development experience much better.
- It integrates in-editor typing with its VS Code extension for the development experience.
- Because it is built in Rust, it is much faster than other type checkers. Thus, performance is not a problem with Pyrefly.
Fluid Attacks last reviewed Pyrefly on Aug 1, 2025.
Usage
Fluid Attacks uses Mypy to enforce strict static type checking on all its Python source code.