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** Both `pass` statements and the ellipsis (`...`) are treated as non-statements by mypy, leading to unexpected handling of an `unreachable` cases. **To Reproduce** Run the following with `--strict...

bug
topic-reachability
topic-type-ignore

**Bug Report** Given an object of type `int | bytes` and a `TypeIs` function that narrows `int | str | bytes` into `int | str`, mypy correctly infers that the...

bug
topic-typeguard-typeis

*Memo: - `mypy --strict test.py` - mypy 1.18.2 - Python 3.14.0 - Windows 11 [The doc](https://docs.python.org/3/library/typing.html#typing.TypeVar) says **'Must be exactly str or bytes'** about `*constraints` to make difference between `bound`...

bug
topic-type-variables

**Add failing test for per-module error code precedence** ### Contribution Summary This Pull Request does **not** contain a functional fix. It contributes a **failing regression test** to clearly document a...

**Bug Report** When checking the type field of a dtype with match, mypy 1.19.0 complains sbout some cases with ` error: Statement is unreachable`. It doesn't look like a numpy...

bug
topic-match-statement

**Bug Report** `mypy bug.py --disable-error-code=unused-ignore` shows > bug.py:1: error: Unused "type: ignore" comment [unused-ignore] > Found 1 error in 1 file (checked 1 source file) **To Reproduce** `bug.py` ```python a...

bug
topic-configuration
topic-error-reporting

**Bug Report** Mypy reports an error (as expected) when a contravariant `TypeVar` is used as a return type. However, if it is wrapped in a `tuple`, no error is reported...

bug
topic-type-variables

**Feature** Allow generic upper bounds such as: ```py class ClassA[T, S: Sequence[T]]: ... ``` **Pitch** [PEP 695](https://peps.python.org/pep-0695/#type-parameter-scopes) has an example that currently doesn't work, and alludes to a future extension...

feature
topic-type-variables

Fixes #20308 **Summary** This PR fixes a false positive `[type-arg]` error when reassigning a generic PEP 695 `TypeAliasType` to a variable without type arguments. **The Fix** Modified `is_type_ref` in `semanal.py`...

**Feature** Add an option to specify junit xml testsuite name. For example `--junit-xml-name` or `--junit-suite-name` . **Pitch** Currently, mypy just writes the generic testsuite name "mypy". In a CI with...

feature