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

**Bug Report** `operator.call` and similarly-typed callables produce an `arg-type` error when used with many generic functions. Additionally, if the `arg-type` error is `# type: ignore`'d, the inferred type is a...

bug

I've found what I *think* is a bug in mypy's attrs support. ```python # test.py import re import attr @attr.s class Test: foo = attr.ib(converter=re.compile) test = Test("foo") ``` ```...

bug
topic-type-variables
priority-1-normal
topic-attrs
false-positive

Fixes #13119 For all final field assignments to class variables in a dataclass i.e. `x: Final[int] = field()`, this PR checks whether this field is being properly assigned in the...

topic-final
topic-dataclasses

* **Request Type**: Feature Request * **Mock-up repro** ([more detailed mock-up here](https://pastebin.com/ErSCLTF4)): ```py import abc import typing # Define two base types `ABase` & `BBase` with a similar interface, #...

feature
priority-1-normal

**Bug Report** Combining an `or` and `dict.get` results in the wrong inferred type. **To Reproduce** https://mypy-play.net/?mypy=latest&python=3.11&gist=8ac5004cd4094219a0f090ebd0d34777 **Expected Behavior** The `or_dict` method in the gist above should type check as valid....

bug

**Crash Report** Basically, I am trying to program a game with the Trio asynchronous library. Using the mypy daemon and type checking different files makes it crash. Trying to make...

crash
topic-daemon

[BUG] **Edited for a clearer example** Given this code: ``` # mypy version 0.770 from typing import Generic, TypeVar T = TypeVar("T", int, str) class A: foo: int class B(Generic[T]):...

bug
topic-type-variables
priority-1-normal
false-positive

As discussed with @AlexWaygood in https://github.com/python/mypy/issues/14245#issuecomment-1336397899 adding a common issue entry for the problem of hitting overshadowing a built-in keyword when upgrading to PEP584 syntax

documentation

**Bug Report** An abstract class fits the typing for `Callable`. **To Reproduce** ```python3 import abc from typing import Callable class A(abc.ABC): @abc.abstractmethod def m(self) -> None: ... class C(A): def...

bug

**Bug Report** Currently when running `mypy==0.991` on a Python 3.11 file that's using `StrEnum`, it errors unexpectedly on an specific named member on my code. In this case, the member...

bug
topic-enum