
20.7k stars · MIT · 2.4.0 (2026-10-01, from the Python package index) · Track this in Scout
The reference type checker for Python, run from the command line.
▶Repo detailsthe review · specs · pros & cons · install
What it does
You add type annotations to your Python source. An annotation is a short note that says what kind of value a function takes and what kind it returns. Then you run mypy over the files, and it reads the code without running any of it, follows values from one function into the next, and prints each mismatch with a numbered error code. It knows the standard library, and it reads the type information that installed packages ship with themselves. Strictness is a dial: you can start with one file and no annotations and add one flag at a time, or turn on --strict and work through the list that comes back. It also ships mypyc, a compiler that turns annotated Python into a C extension module, which is how the checker itself is made fast. Release 2.4.0 was published on 1 October 2026, and code was pushed to the repository on 19 October 2026. It does not find mistakes in your logic, it does not check anything while a program is running, and it does not change the way the code is written.
Why it matters
Who it suits.
Anyone looking after a Python codebase of more than a few files, and above all one with several authors. The gain is largest at the edges of a program, where a value arrives from a web request, a file or a database and could be anything at all. It also suits a team that wants one place to settle an argument about what the typing rules actually say. Skip it if the project is a single script that can be read end to end, because writing the annotations will cost more than they return.
Verdict.
This is the reference implementation, and the typing rules for Python are written against it, so when two checkers disagree this is the one that settles it. It is also the slowest of the serious options, which matters if the checking is meant to happen while you type. Treat the choice as a pairing rather than a contest: one of the fast checkers in the editor, this one in the step that runs before code is merged. Edition 44 covered astral-sh/ty and Edition 47 covered facebook/pyrefly, both written in Rust and both much quicker, and microsoft/pyright is the one already built into Visual Studio Code. The project is plainly alive: code was pushed on 19 October 2026 and release 2.4.0 is three weeks old. One thing to read before redistributing it: the licence is MIT, but parts of the tree carry other licences.
- The reference checker, so its reading of an unclear rule is the one that counts.
- Switches on gradually. One file, one flag, one module at a time.
- Every error code is documented, so a confusing message can be looked up.
- Slow on a large codebase next to the checkers written in Rust.
- Some error messages take a few readings before they make sense.
- The licence is MIT, but parts of the tree carry other licences, including the Python Software Foundation licence.
- microsoft/pyright
A fast checker and language server, and the engine behind the Python experience in Visual Studio Code; a command-line tool as well, but editor-first in a way mypy is not.
Track this in Scout
facebook/pyreflyA Rust checker and language server built for speed on large codebases, covered in Edition 47.
Track this in Scout
astral-sh/tyAnother Rust checker aiming at the same job with very fast runs, covered in Edition 44.
Track this in Scout
python3 -m venv venv source venv/bin/activate pip install mypy mypy your_module.py