mypy 0.971


Optional static typing for Python

Optional static typing for Python

Stars: 13591, Watchers: 13591, Forks: 2266, Open Issues: 2263

The python/mypy repo was created 9 years ago and was last updated an hour ago.
The project is extremely popular with a mindblowing 13591 github stars!

How to Install mypy

You can install mypy using pip

pip install mypy

or add it to a project with poetry

poetry add mypy

Package Details

Jukka Lehtosalo
MIT License
GitHub Repo


  • Software Development
No  mypy  pypi packages just yet.


A list of common mypy errors.

Code Examples

Here are some mypy code examples and snippets.

GitHub Issues

The mypy package has 2263 open issues on GitHub

  • Treat methods with empty bodies in Protocols as abstract
  • MyPy fails to install with pyenv/poetry due to typed-ast dependency
  • Use union instead of join for unifying types
  • Show ignored errors
  • Fix two type inference bugs related to enum value attributes
  • Incompatible return value type (got "function", expected "Callable[…, Any]")
  • Add –allow-empty-dir option
  • Unexpected type inference changes related to enum value attributes
  • Fix TypeGuard Explicit Any Check
  • Explicit Any check for TypeGuard
  • Error on instance property and init-only variable with the same name in a dataclass
  • Adding init breaks type inference from new
  • Fix format checking for Unions with alias with custom format
  • [mypyc] Implement close method for generators
  • Fix crash involving explicit any flag and Required

See more issues on GitHub

Related Packages & Articles

flake8 5.0.4

the modular source code checker: pep8 pyflakes and co