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

Found a few typos in the docs and just wanted to pitch in to update those.

```py from typing import Callable, Concatenate, TypeVar, overload, ParamSpec T = TypeVar("T") P = ParamSpec("P") R = TypeVar("R") def foo(fn: Callable[Concatenate[T, P], R]) -> Callable[Concatenate[T, P], R]: return fn class...

bug
topic-paramspec

**Crash Report** mypy crashes. **Traceback** ``` > mypy . Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "c:\Code\project\.venv\Scripts\mypy.exe\__main__.py", line 8,...

crash

Fixes https://github.com/python/mypy/issues/9884 I was always a bit skeptical about this thing, since it feels more like TypeScript than Python, but it is second most upvoted issue. Also (this specific) implementation...

**Bug Report** When using "yield from" for an iterable instance the type inference if wrong. Normal for-loop iteration over the same iterable does work though. **To Reproduce** ```python from typing...

bug
good-second-issue

**Bug Report** `from numba import typed` causes mypy to generate spurious attr-defined errors for everything else imported from numba. **To Reproduce** ```python from numba import njit, typed # error: Module...

bug

**To Reproduce** ```python # mypy: enable-incomplete-feature=NewGenericSyntax from collections.abc import Callable from typing import Protocol class ActionType(Protocol): def __call__(self, var: str, context: int = 2) -> None: ... class Job[*_Ts]: def...

bug
topic-protocols
topic-pep-646

Fixes #17394 (Explain how this PR changes mypy.) Updates stubdoc is_valid_type regex.

**Feature** A new optional setting for mypy which forbids matching `str` against `Sequence[str]` or `Iterable[str]`. This will catch a wide variety of bugs which users encounter when defining APIs which...

feature

**Bug Report** Hello, I'm experiencing an error while unpacking lists with union type. the problem is not occuring for a flat list (see simple exampe bellow) **To Reproduce** ```python #...

bug
topic-union-types
topic-type-context