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** See title, I think this is the cause of the remaining issue for https://github.com/python/mypy/issues/9424. I think this is a followup to https://github.com/python/mypy/pull/19183. **To Reproduce** ```python from typing import...

bug
topic-type-variables
topic-type-narrowing

Fixes #18661. Please see that issue for discussion and justification. However, briefly: import-untyped-stubs-available is now a new error, so that it can be enabled while import-untyped is left disabled, so...

**Bug Report** mypy loses information about types. 'str | tuple[str, ...]' becomes 'Sequence[str]' **To Reproduce** ***version 1: this fails*** ```python from typing import TypeVar T = TypeVar('T') def unwrap(x: T...

bug
topic-join-v-union

**Bug Report** Elements/members of an `Enum` which have the same value (aliases or duplicate values) are treated as never-equal in mypy. **To Reproduce** mypy-play.net [gist](https://mypy-play.net/?mypy=latest&python=3.12&flags=strict-equality%2Cwarn-unreachable&gist=55cf24991348a07610b4bf8127a305f2) ```python # run with: --strict-equality...

bug
topic-enum

Refs #18748 I opted to put this behavior behind a new feature flag (instead of tying it to the existing `InlineTypedDict` flag), since that helps avoid issues with mixing the...

I've created a failing test case for a mypyc bug with dict views as seen here: https://github.com/BobTheBuidler/checksum_dict/actions/runs/14843222374/job/41670896987 I added some new (working) test cases: - dict - keys - values...

Fixes #19015. Fixes #17521. Side question: why do we do that extra work to show "is already defined" error instead of "implementation must come last" in the following setting? ```python...

**Bug Report, To Reproduce, & Actual Behaviour** In the following, `sys.version_info >= ...` can be any other compile-time constant (e.g. those set by `always_true` / `always_false`, `typing.TYPE_CHECKING`, etc.). It appears...

bug
topic-overloads

**Bug Report** Mypy false positive: Mypy thinks that setting the converter class attribute for a subclass of `logging.Formatter` to something like `time.gmtime` is wrong. **To Reproduce** ```python class UTCFormatter(logging.Formatter): """An...

bug
topic-calls

**Bug Report** You can pass `**kwargs` or `*args` to a function, even if all of its arguments are already passed. I would expect this to raise an error, since it's...

feature
topic-calls