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

**Crash Report** I ran mypy in my venv and the cache somehow got into a bad state, leading to crashes until the cache was removed. I don't know what triggered...

crash

https://github.com/mesonbuild/meson/blob/master/mesonbuild/cmake/fileapi.py This file started triggering: ``` mesonbuild/cmake/fileapi.py:81:20: error: "None" has no attribute "__iter__" (not iterable) [attr-defined] mesonbuild/cmake/fileapi.py:82:20: error: Value of type "None" is not indexable [index] mesonbuild/cmake/fileapi.py:84:36: error: Value of...

bug
topic-strict-optional
topic-type-narrowing

> I don't think there's anything actionable for mypy here in any case. > > > > `functools.partial` was recently special-cased, is there any appetite to do the same for...

feature

### Description Fixes #12987 * Ignore unknown error codes in process_options * Reload enabled / disabled error codes after loading plugins * Unknown errors codes no longer a hard failure,...

Fixes #19006 - Added unit test `TypeCheckSuite::check-expressions.test::testReverseBinaryOperator4` - Added fixture `tuple-typeshed.pyi` that duplicates the tuple definition from typeshed. This patch drops the `is_subtype(right_type, left_type)` check in favor of the weaker...

**Bug Report** The handling of types for `IntEnum` literals shows no overlap with `int` literals. The handling for int variables appears to be correct, **To Reproduce** [playground](https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&gist=7b0d66d9a775b03135ba33fba6ba2c20) ```python from enum...

bug
topic-enum

Fixes https://github.com/python/mypy/issues/18635

Fixes https://github.com/python/mypy/issues/18891

Fixes #19201. When inferring callable constraints, excludes constraints with `dict` target when other constraints have `TypedDict` type. The *right* way to do this would be to allow backtracking in meet...

this appears to have changed behaviour in mypy 1.15 -- I personally prefer the behaviour in 1.15 but would understand if it needed to change. I don't see it mentioned...

bug
topic-usability
topic-type-ignore
topic-error-reporting
pending