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

This seems to be a somewhat common `zip` idiom: ```py >>> a = [('a', 1), ('b', 2), ('c', 3)] >>> list(zip(*a)) [('a', 'b', 'c'), (1, 2, 3)] ``` The inferred...

feature
priority-1-normal
topic-plugins
topic-calls

Modules can implement protocols, so `type(x)` is not necessarily a type object if `x` has a protocol type. ```py from typing import Protocol class P(Protocol): def f(self) -> None: ......

bug
topic-protocols

**Bug Report** In the global scope, mypy allows destructuring any object in `match case` with `object(x=y)`: ```py @dataclass class A: id: int # SUCCESS match A(id=5): case object(id=object_id): print(object_id) ```...

bug
topic-match-statement

* (fix): when --include-private is not passed stubgen omits packages and modules which names start with "_" and do not end with "__" ___ This commit aims to close #16808....

Nothing much, updated several docstrings. ___ * (docs): update docstrings in `.check_override()`, add missing args description * (docs): update docstring in `maybe_process_conditional_comparison()`, add missings args description

**Crash Report** mypy crashes with segmentation fault as such: ```plaintext mypy-segmentation-fault on  main is 📦 v0.1.0 via 🐍 v3.11.6 (mypy-segmentation-fault-py3.11) ❯ mypy --version mypy 1.7.1 (compiled: yes) mypy-segmentation-fault on...

crash
topic-protocols
topic-self-types

```py from typing import Hashable, Any t1: type[Any] = type h1: Hashable = t1 # error: Incompatible types in assignment (expression has type "Type[Any]", variable has type "Hashable") ``` Which...

bug

```py from typing import Protocol import test2 # def foo() -> None: ... class P(Protocol): def foo(self) -> None: ... a: P = test2 reveal_type(a.foo()) # None a = test2...

bug
topic-type-narrowing

**Bug Report** When using `MYPY_FORCE_COLOR` (or `FORCE_COLOR` with `master`) on GitHub Actions (which is not a tty), colour only shows up for Windows, and not for Ubuntu or macOS. **To...

bug
topic-configuration

Very similar to https://github.com/python/mypy/issues/1983 but still happens with mypy 1.0 **Bug Report** **To Reproduce** ```python from typing import Callable, Any from random import randrange def test(x: Callable[[Any], None]): pass def...

bug
topic-ternary-expression