mypy
mypy copied to clipboard
Optional static typing for Python
**Documentation** Comparing the current mypy logo: [](http://mypy-lang.org/) With several others in the community: [![Code style: black][black-badge]](https://github.com/psf/black) [![Imports: isort][isort-badge]](https://pycqa.github.io/isort/) [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg [isort-badge]: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 I think that the mypy...
**Bug Report** Mypy reports a strange type error when calling `bytes(filter(...))` like below. Write the following contents to a file and run mypy: ``` f = filter(lambda ch: chr(ch), b"hello")...
**Bug Report** I'm not sure what's going on, better check the example. Also mypy experts, please forgive me if this is intentional behavior and not a bug. **To Reproduce** ```python...
This enables the error code added in #14163. We aren't sure if it will cause too many problems. We can see what the mypy primer outputs as well.
**Bug Report** As expected, a class `A` can be typed as `Type[A]` or `Callable[P, A]`, where `P` is a `ParamSpec`. Using `Concatenate` then, you should also be able to bind...
**Bug Report** With `pandas-stubs`, we are using `pyright` and `mypy`. We have code that we want to test with `pyright`, but not `mypy` because of a `mypy` bug. We are...
I need to execute some code only on specific Python version (it is the use of `TextIOWrapper.reconfigure()` added in Python 3.7, but in following example I will use more abstract...
Comment by @huguesb in #14277: > The repeat checkout/compilation cost is a real problem for repeated measurements when iterating through possible approaches though. At the very least you'd want to...
We automatically track changes in mypy performance over time (#14187). Currently we can detect changes of at least 1.5% pretty reliably, but smaller changes are hard to detect. #14187 has...
**Feature** Detect free type variables as instance attribute annotations, when they appear from constructor with TypeVar in signature without `Generic`. **Pitch** It would be especially useful for beginners. People often...