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

Mypy does not detect the case where a covariant or contravariant class (i.e. a class that is parameterized by a class-scoped covariant or contravariant TypeVar) derives from an invariant class....

bug
topic-type-variables

**Bug Report** Mypy cannot determine the type of the declared field inside a protocol method. **To Reproduce** Invoke mypy on the following Python file ```python # bug.py from typing import...

bug
topic-protocols

**Bug Report** Defining a TypeGuard for callable to check if coroutine doesn't work when passed a generic callable with Concatenate. **To Reproduce** 1. Write this code ``` _PArgs = ParamSpec("_PArgs")...

bug
topic-paramspec
topic-typeguard

**Bug Report** When a decorator function hinted to return a callable with any result type effectively returns a callable with more specific return type there's a mypy error. **To Reproduce**...

bug
topic-paramspec

**Bug Report** When using `Union[Iterable[int], Dict[str, int]]` together with `isinstance(x, Iterable)` in a conditional, the narrowing of the type does not work as expected. The previously correctly narrowed type is...

bug
topic-type-narrowing

**Bug Report** I wanted to have a quick way of concatenating results of several mixin-like implementations of similar algorithms. Below is a MWE of what I wanted to implement **To...

feature
priority-2-low

### Description Note: This change is part of a series of upcoming MRs to improve `stubgenc`. `stubgenc` tries 3 approaches to infer signatures for a function. There are two problems...

**Feature** The only way I've been able to set the dmypy status file is by passing `--status-file` on the command-line, but I'm running dmypy in a few different scripts and...

feature
topic-daemon
topic-configuration

This fine-grained incremental test case fails (no error on second run): ``` [case testDecoratedToAsyncReExported] from mm import f x: int = f() [file mm.py] from m import f [file m.py]...

bug
topic-daemon
topic-async

`sus.py`: ```py def f() -> None: ... ``` `amongus.py`: ```py from sus import f f(x=1) ``` ``` 👉 mypy -m amongus amongus.py:2:1: error: Unexpected keyword argument "x" for "f" [call-arg]...

bug
topic-incremental