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** I expect `n = Callable[P, int]` to work, or at least `n: TypeAlias = Callable[P, int]` **To Reproduce** ```py from typing import ParamSpec, Callable, TypeAlias P = ParamSpec("P")...

bug
topic-paramspec
topic-type-alias

**Bug Report** Some code I was working on last week is causing mypy to segfault. I tried retracing my steps to find the change that broke mypy, without luck. Config:...

crash
priority-0-high

**Feature** I want mypy to show errors for all platforms and versions, not just the current/selected one ```py import sys if sys.version_info < (3, 11): print(21 + "sus") # very...

feature

```py from typing import overload, Literal class A: ... class B: ... class C(A, B): ... @overload def foo(a: Literal[True], b: Literal[True]) -> C: ... @overload def foo(a: Literal[True], b:...

bug
topic-overloads

If Black fails in CI, it would be nice to show prominently the exact command needed to fix the issue (possibly just `black .`). I guess isort could be similar....

feature
topic-developer

```py from typing import Any s: Any = slice(1, 2, 3) class X(s): ... print(X) # slice('X', (slice(1, 2, 3),), {'__module__': '__main__', '__qualname__': 'X'}) x = X() # TypeError: 'slice'...

bug

This PR improves mypy's understanding of the mypy codebase, and reduces the number of false positives if you run the selfcheck with `--warn-unreachable`. --- As stated in this docstring here,...

**Feature** Add a new check, `[disallow-non-exhaustive-match]`, that enforces at type check time that no `match` statements implicitly fall through their bottom. I would prefer if this check were on-by-default, or...

feature
topic-match-statement

Consider this example: ```py from __future__ import annotations class X: ... class Y: @property def some_property(self) -> Descriptor: # return Descriptor instance return Descriptor() class Descriptor: def __get__(self, obj: X,...

bug
topic-descriptors