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** When calling a generic function taking a type variable bound to a typed dictionary type, MyPy reports that the typed dictionary type does not have `__required_keys__` and `__optional_keys__`....

bug

**Bug Report** If I define an abstract method in a base class with generic parameters and one specific parameter, I cannot have a subclass implementing this method with specific parameters...

bug

**Bug Report** When a project contains an untyped source (`.py`) file and a corresponding stub (`.pyi`) file, Mypy may emit "Duplicate module" errors depending on how the files were passed...

bug

```py class A: ... class B(A): def __get__(self, i, o) -> int: return 1 class Something: a: A = B() reveal_type(Something.a) # Revealed type is "A" ``` actual value at...

feature

[PEP 695](https://peps.python.org/pep-0695/) was accepted, and it looks like it will make it into Python 3.12. This PEP adds support for a new type parameter syntax for generic classes and methods....

feature
topic-type-variables
topic-pep-695

Given a local file which uses something which is a namespace package and then another local file which uses the first one, there's an intermittent bug where the namespace packaged...

bug
topic-incremental

**Bug Report** The same variable assigned in different branches of an if statement is considered as being redefined, despite the fact that at in reality there is only one assignment...

bug

**Crash Report** this could be related to #15927, but that ticket is related to python 3.10; mine is specific to python 3.13's new `TypeVar(..., default=...)` argument (the default argument is...

crash

**Feature** Mypy should check whether format strings in `f`-strings make sense in basic cases. **Pitch** Consider this minimal example ```python print(f"{123:xyz}") ``` This fails at runtime with > Value Error:...

feature

**Bug Report** Mypy reports a type error for the eta expansion of code that it does not error on. See below for an example. **To Reproduce** ```python from __future__ import...

bug