3.6. Type Annotation Static Analysis

3.6.1. MyPy

$ pip install mypy
$ mypy FILE

setup.cfg

[mypy]
strict_optional = True

3.6.2. PyType

$ pip install pytype
$ pytype -V 3.9 myfile.py

3.6.3. Pyre-check

  • Type Checking

3.6.4. PyAnnotate

The -w flag means "go ahead, update the file":

$ pip install pyannotate
$ pyannotate -w myfile.py

3.6.5. Monkeytype

$ pip install monkeytype
$ monkeytype run runtests.py
$ monkeytype stub some.module
$ monkeytype apply some.module