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

Fixes #4266. Fixes #18622. Refs #2455. This is the first step towards checking hashability of dict keys (and `Hashable` compatibility in general). This PR implements the following rules: * `__hash__...

@A5rocks found the following bug when discussing #19118: ```python def f4() -> None: while int(): try: x = 1 if int(): x = "" break if int(): while int(): if...

bug
topic-reachability

`in` keyword narrowing was implemented for TypedDicts, but not `.get()`. I understand that it may be hard to implement for arbitrary `default` arguments of `.get(key, default)`, but the `.get(key)` variable,...

bug
topic-typed-dict

**Bug Report** If a function signature contains one or more explicit keyword parameters followed by a **kwargs parameter, and the function is called on kwargs only, then mypy generates false...

needs discussion

Possibly related: #10680 **Bug Report, To Reproduce, & Actual Behaviour** The following snippet doesn't type-narrow properly (see [mypy Playground](https://mypy-play.net/?mypy=latest&python=3.12&flags=strict-bytes&gist=cf1f8558066ff81d9675987b137e0ba7)): ```python from typing import Protocol type StaticCallback[**P, R] = Callback[P, R]...

bug
topic-type-narrowing

**Bug Report** Mypy incorrectly raises an error when i `return await ...` **To Reproduce** I cant seem to reproduce without using SQLAlchemy, but here is an MRE with it. Its...

bug
topic-type-context

This is useful check for dead code analysis. Iff the rate of false-positives is low enough, then this is a worthwhile addition to strict. I am currently slowly investigating the...

Achieves a todo, enabling warn_unreachable = True for `mypyc` and all other files as well

**Bug Report** I believe that I've found a bug in mypy, the following MRE should as far as I can tell not result in any typing errors at all, but...

bug
topic-type-context

Hi 👋 ! I have the following test code: ``` from collections import defaultdict from typing import DefaultDict from mypy_extensions import TypedDict RepoPath = str RepoStatus = TypedDict('RepoStatus', { 'branch':...

bug
topic-typed-dict
priority-1-normal
false-positive