Contents

mypy 1.19.1

0

Optional static typing for Python

Optional static typing for Python

Stars: 20220, Watchers: 20220, Forks: 3131, Open Issues: 3087

The python/mypy repo was created 13 years ago and the last code push was an hour ago.
The project is extremely popular with a mindblowing 20220 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

Author
None
License
MIT
Homepage
None
PyPi:
https://pypi.org/project/mypy/
Documentation:
https://mypy.readthedocs.io/en/stable/index.html
GitHub Repo:
https://github.com/python/mypy

Classifiers

  • Software Development
No  mypy  pypi packages just yet.

Errors

A list of common mypy errors.

Code Examples

Here are some mypy code examples and snippets.

GitHub Issues

The mypy package has 3087 open issues on GitHub

  • Passing an unpacked dictionary and keyword arguments to **kwargs gets unexpected erros
  • Inconsistent behavior for missing type variables in return slots
  • ENH: Support slack variables (lower bound emulation)
  • Signature inference for special methods
  • Move several command line tests to check tests
  • Improve documentation: explain unannotated functions in common issues
  • Generic method in generic class impacting type signature of unrelated method
  • Better narrowing with custom equality
  • Narrowing for comparisons against x.class
  • [mypyc] Do not emit tracebacks with negative line numbers
  • Show relative error location for function aliases
  • [do not review] Avoid narrowing TypeType
  • Show error locations in other modules on warm runs
  • unable to differentiate internal AssertionError from type errors by exit code
  • Mypy not inferring return type of dict.get()

See more issues on GitHub

Related Packages & Articles

flake8 7.3.0

the modular source code checker: pep8 pyflakes and co