Mypy is still in development. Most Python features are supported.
Mypy 0.660 released
16 January 2019: Mypy 0.660 was released. Read the blog post for more details. -Michael J. Sullivan
Mypy 0.650 released
7 December 2018: Mypy 0.650 was released. Read the blog post for more details. -Jukka Lehtosalo
Mypy 0.641 released
15 October 2018: Mypy 0.641 was released. It adds support for "final" qualifiers, and namespace packages. It also has many bug fixes and documentation updates. Read the blog post for more details. (Note that 0.640 was withdrawn due to a regression.) -Guido van Rossum
Mypy 0.630 released
17 September 2018: Mypy 0.630 was released. It adds support for callback protocols and many smaller improvements, bug fixes, and documentation updates. Read the blog post for more details. -Ivan Levkivskyi
def fib(n): a, b = 0, 1 while a < n: yield a a, b = b, a+b
def fib(n: int) -> Iterator[int]: a, b = 0, 1 while a < n: yield a a, b = b, a+b
Migrate existing code to static typing, a function at a time. You can freely mix static and dynamic typing within a program, within a module or within an expression. No need to give up dynamic typing — use static typing when it makes sense. Often just adding function signatures gives you statically typed code. Mypy can infer the types of other variables.
Mypy type checks programs that have type annotations conforming to PEP 484. Getting started is easy if you know Python. The aim is to support almost all Python language constructs in mypy.
Mypy has a powerful, modern type system with features such as bidirectional type inference, generics, callable types, abstract base classes, multiple inheritance and tuple types.
Many commonly used libraries have stubs (statically typed interface definitions) that allow mypy to check that your code uses the libraries correctly.