mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Optional static typing for Python

Results 1055 mypy issues
Sort by recently updated
recently updated
newest added

**Feature** Mypy should support module-level constants defined by `enum.global_enum`. **Pitch** [`enum.global_enum`](https://docs.python.org/3/library/enum.html#enum.global_enum) adds an enum’s members to the global namespace. Mypy reports errors for any use of global constants defined that...

feature

Python 3.9 is reaching the end of its life tomorrow. We should also drop support from mypy at some point, though not necessarily immediately. Concrete issue: https://github.com/python/mypy/blob/72131392483c19a6b8db812f4d4acfdb50a769dd/.github/workflows/test.yml#L84-L85 currently uses a...

meta

**Feature** Currently, the `cobertura_xml_report` is used as folder path, in which mypy typically only produces a single file `cobertura.xml`. I would like to be able to specify a direct output...

feature

Unsurpringly, reassigning some generic `TypeAliasType` named `A` as `B = A` is not the same as subscripting it as `B = A[Any]`: ```pycon >>> type A[T] = T | str...

bug

```py type A[T] = T reveal_type(A[int]) # ❌ typing.TypeAliasType ``` yet ```py >>> type A[T] = T >>> type(A[int]) ``` on master and v1.18.2

bug

Hi! I am trying to make a custom tool to run `mypy` on doctests inside my project. Because I want to be sure that my examples are correct. And since...

feature

Supersedes https://github.com/python/mypy/pull/17512 as I figured out how to handle this case in a more general manner. This PR fixes https://github.com/python/mypy/issues/16522. It adds a mechanism for constraints to be discarded if...

**Bug Report** Class factory, that uses `TypeVar` with upper bound as a type, suffers from over-inference, thinking that `type[SomeTypeVar]` gives its upper bound on instantiation. **To Reproduce** ```python from typing...

bug

**Bug Report** I'm getting a bunch of false positives when reusing `.mypy_cache` in CI and refactoring the code base. They disappear after clearing the CI mypy cache, so they must...

bug

Fixes https://github.com/python/mypy/issues/20283 This is a bit gross, but I'm not sure how to better do this. The problem is that we look up class attributes before looking at locals, but...

crash