Pytype checks and infers types for your Python code without using any type annotations. It can:
- flag common mistakes such as mispelled attribute names, incorrect function calls, and much more, even across file boundaries.
- Enforce user-provided type annotations.
- Generate type annotations in standalone files ("pyi files"), which can be merged back into the Python source with a provided merge-pyi tool.
Pytype is a static analyzer, which means it does not execute the code it runs on.
For more information, check out the user guide