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 was originally reported in https://github.com/python/mypy/issues/3644#issuecomment-825494986 ``` from typing import Callable, TypeVar, Generic, Union _U = TypeVar('_U') _T = TypeVar('_T') class Future(Generic[_T]): def __init__(self, t: _T): self._t = t def...

bug
topic-type-variables
topic-union-types

### Repro In `file.py`: ```python import other ``` In `other` (no file extension): ```shell #!/bin/sh echo syntax error ``` Running: ``` $ mypy file.py other:3: error: invalid syntax [syntax] Found...

bug

**Bug Report** In pandas-stubs, we'd like to be able to have a class that can be passed to the standard python `sorted()`, `max()`, `min()` functions, etc. But mypy doesn't seem...

bug

**Bug Report** PEP 604 introduced the `|` syntax, however it's not entirely equivalent to the `Union` syntax. Forward references with `|` are not supported and result in TypeErrors `TypeError: unsupported...

feature
topic-pep-604
topic-runtime-semantics

**Bug Report** When I transform a value into an enum, an error occurs in the `match case` construct. If you convert the value in advance, there will be no error....

bug
topic-match-statement
topic-reachability

Avoid false "Incompatible return value type" errors when dealing with `isinstance`, constrained type variables and multiple inheritance (Fixes #13800). The idea is to make a union of the current expanded...

I'm seeing an Incompatible return value type error in 0.981 that wasn't present in previous versions of mypy. **To Reproduce** ```python from typing import TypeVar T = TypeVar("T", dict, float)...

bug
topic-type-variables
priority-0-high

The calls to `f` and `ff` below aren't rejected when using `--disallow-untyped-calls`, even though I believe that they should be: ```py from typing import Any from non_existent import f #...

bug
priority-0-high
topic-usability

**Bug Report** I've been trying to mypy to typecheck subclasses that need to provide a required value for a `ClassVar` in a base class that cannot provide the value itself...

bug

**Bug Report** If i have `python_version = 3.5` set, it's not possible to tell mypy to ignore related syntax errors it finds in dependencies. Use case: i have code which...

bug