mypy is a static type checker for Python that analyzes source code without executing it, catching type errors early in development. It implements PEP 484-style type hints and supports gradual typing, allowing untyped or partially typed modules to coexist with statically typed code. The tool integrates with common editors and CI systems, and offers a daemon mode for fast, incremental checks across large codebases. Advanced configuration via mypy.ini or pyproject.toml enables per-module strictness, plugin hooks for popular libraries, and fine-grained control of inference and error reporting. Documentation covers everything from newcomer guides to strict mode recipes and release notes. The ecosystem includes typed stubs, third-party plugins, and broad community support that makes mypy a default choice for large Python projects.
Features
- Gradual typing with PEP 484 type hints
- Fast incremental checks via daemon mode
- Rich configuration with per-module strictness
- IDE and CI integrations for continuous feedback
- Plugin system and third-party library stubs
- Detailed reports and error codes for large projects