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** Mypy reports `[valid-type]` for a variable defined in the same file but not when the variable is imported in other files. **To Reproduce** Create 3 files ```python #...

bug
topic-error-reporting

Release tracker for 1.17 If there are any PRs you would like to ensure are included, please mention here

meta

**Bug Report** It's unclear from the docs and runtime what the expected behavior is if you define multiple `[[tool.mypy.overrides]]` with overlapping modules. **To Reproduce** ```toml [[tool.mypy.overrides]] module = [ "openstack._log",...

bug
topic-configuration

As requested by @ilevkivskyi in #19025

**Feature** Add type checking for passing `*args` and `**kwargs` to another function. It may be enabled by default when mypy detects `*args` and `**kwargs` are passed to the same function...

feature
topic-calls

**Bug Report** Property setter detection is now a bit too greedy. No matter what, a decorator of the shape `@something.setter` is treated as a setter of the preceding `@property` -...

bug
topic-descriptors

**Bug Report** The code in this [mypy playground](https://mypy-play.net/?mypy=latest&python=3.13&gist=afe483ca85e336374ec6a02acb81830e) raises the following error. ``` Name "T" is not defined [name-defined] ``` However, as seen in this [pyright playground](https://pyright-play.net/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMoDGAhgM4wA0UIApgG7VEA2A%2BvAtQFCiSFiOPUCMJGBQkAdEQBGBTNlz4Awk0bSBHDgVUkSUAErUcAbQAqlAKoBdAFxRx9jQBNqwKCUjVTFygCofABUsACmAAVxQCW2V%2BNU9-C0sASigAWgA%2BKGjVKQEjeKgraw4oEqhnVwB3ECIEdhAgnyIQNBJbf0lmkl8fAGsKppa28T6BkmT0gqLS6ao6BhY2aiDiMiCDYzMCy0pRowAGJMTimZKaGFCQFCgwiIbR7pHOo%2Bmzi6uqmrqgA) there is no...

bug
topic-pep-695

**Bug Report** Type narrowing can't remove type(None) from a union. **To Reproduce** ```python def get_class(x: int) -> type[str | None]: if x > 0: return str else: return type(None) x...

feature
topic-type-narrowing

**Bug Report** Attempting to make a type alias for a decorator results in MyPy losing type information. **To Reproduce** ```python from typing import * type Fn[**P, R] = Callable[P, R]...

bug
topic-type-alias

**Feature** there are various plugin points for `ClassDef` (either by base class, metaclass, decorators, etc.) these are useful when one of those are present but it can be difficult to...

feature
topic-plugins