mypy
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
What mypy is
mypy is a static type checker for Python. It reads PEP 484 type hints and reports code that uses those types incorrectly, without executing the program. Type hints do not change runtime behaviour, and the Python interpreter still runs code that mypy flags. It is designed for gradual typing, so annotations can be added over time with dynamic typing as a fallback. Its type system includes inference, generics, callable, tuple and union types, and structural subtyping. It runs from the command line. A daemon mode, dmypy, gives incremental updates on large code bases. Editor integrations exist for VS Code, Vim, Emacs, Sublime Text, PyCharm and IDLE, plus a pre-commit hook.
Written from the project's README, read , and its documentation (see sources).
- Category
- Code quality and static analysis
- License
- MIT
- Language
- Python
- Changelog
- Releases on GitHub
Repository metrics
Status
activeLast commit within 90 days of the fetch date.Computed from the last commit date and the archive flag on the fetch date. See the status rules.
Alternatives
Listed code quality and static analysis tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from mypy's, with its source. See also mypy alternatives.
Bandit: Languages or files analysed: Python files, parsed into an abstract syntax tree (AST). source: README
Pylint: Languages or files analysed: Python code (latest version supports Python 3.10.0 and above). source: README
Flake8: Languages or files analysed: Python code, through PyFlakes, pycodestyle and the McCabe script. source: README
mutmut: Languages or files analysed: Python code. source: README
Ruff: Languages or files analysed: Python files (*.py, *.pyi), Jupyter Notebooks (*.ipynb) and pyproject.toml. source: Docs: Configuring Ruff
ShellCheck: Languages or files analysed: Shell scripts in the sh, bash, dash, ksh and BusyBox dialects. source: Docs: shellcheck(1) manual
ESLint: Languages or files analysed: ECMAScript/JavaScript code; JSX parsing when enabled. source: README
golangci-lint: Languages or files analysed: Go code. source: README
Comparisons
How to install
python3 -m pip install -U mypyQuestions
Is mypy open source?
Yes. mypy is released under MIT, an OSI-approved license, as reported by the GitHub API on 2026-09-22.
Is mypy maintained?
On 2026-09-22, the last commit to the default branch was on 2026-09-22, so the listed status is active. Rule: Last commit within 90 days of the fetch date.
How many GitHub stars does mypy have?
20,648 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.
What language is mypy written in?
The repository's primary language, as reported by the GitHub API, is Python.
How do I install mypy?
The README gives this command: python3 -m pip install -U mypy
Sources
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: tags, read
- GitHub REST API: contributors, read
- LICENSE file, read
- README, read