You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
================================================================================
#21809: Inferred attribute type feeds back as call context, rejecting its own defining assignment
Labels: bug
Link: https://github.com/python/mypy/issues/21809
@@ -1,2 +1 @@-gh_21809_body_0.py:10: error: Argument 1 to "select_one" has incompatible type "dict[str, str]"; expected "Mapping[str | None, str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#21104: error: "key" to "max" has incompatible type
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/21104
@@ -1,3 +1 @@-gh_21104_body_0.py:5: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-gh_21104_body_0.py:13: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_21104_c4182228659_0.py:2: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#20648: ENH: Support slack variables (lower bound emulation)
Labels: feature
Link: https://github.com/python/mypy/issues/20648
@@ -1,7 +1,5 @@-gh_20648_body_0.py:21: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B]" [arg-type]-gh_20648_body_0.py:21: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B]" [arg-type]
gh_20648_body_0.py:22: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:22: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:23: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[object]" [arg-type]
gh_20648_body_0.py:23: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[object]" [arg-type]
-Found 6 errors in 1 file (checked 1 source file)+Found 4 errors in 1 file (checked 1 source file)
================================================================================
#20219: Parameter TypeVar unexpectedly becomes optional when unpacking call results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/20219
@@ -1,4 +1 @@-gh_20219_c3518177325_0.py:6: error: Argument 1 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_c3518177325_0.py:6: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_c3518177325_0.py:6: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,4 +1 @@-gh_20219_body_0.py:16: error: Argument 2 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_body_0.py:16: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_body_0.py:16: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19304: Assigning to intermediate variable changes type checking results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19304
@@ -1,2 +1 @@-gh_19304_body_1.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_c4137608031_0.py:2: error: Argument "key" to "min" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[str]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_0.py:16: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_5.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19259: Argument "key" to "sorted" has incompatible type "Callable…"
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19259
@@ -1,2 +1 @@-gh_19259_body_0.py:23: error: Argument "key" to "sorted" has incompatible type "Callable[[int], int]"; expected "Callable[[int | str], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18689: bogus complaint when checking Callable arguments
Labels: bug, topic-type-variables, topic-type-context
Link: https://github.com/python/mypy/issues/18689
@@ -2,7 +2,6 @@
gh_18689_c2661719816_0.py:15: note: Revealed type is "tuple[float | str, bool]"
gh_18689_c2661719816_0.py:17: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:18: note: Revealed type is "bool"
-gh_18689_c2661719816_0.py:20: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]
gh_18689_c2661719816_0.py:21: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:22: note: Revealed type is "bool"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_18689_body_0.py:14: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18267: mypy incorrectly complains about incompatible type error
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18267
@@ -1,5 +1,3 @@
gh_18267_body_0.py:54: error: Missing type arguments for generic type "Field" [type-arg]
gh_18267_body_0.py:80: error: Missing type arguments for generic type "OneOfField" [type-arg]
-gh_18267_body_0.py:100: error: Argument 1 to "with_" of "OneOfField" has incompatible type "StringField"; expected "Field[str | int, str | int]" [arg-type]-gh_18267_body_0.py:100: error: Argument 2 to "with_" of "OneOfField" has incompatible type "IntegerField"; expected "Field[str | int, str | int]" [arg-type]-Found 4 errors in 1 file (checked 1 source file)+Found 2 errors in 1 file (checked 1 source file)
================================================================================
#18236: False positive `[operator]` on union of dicts with heterogeneous value types
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18236
@@ -1,3 +1,2 @@
gh_18236_body_0.py:5: note: Revealed type is "dict[str, str | None]"
-gh_18236_body_0.py:11: error: Unsupported operand types for | ("dict[str, str]" and "dict[str, str | None]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17694: `functools.reduce` over sets becomes unacceptable when used in a larger expression
Labels: bug
Link: https://github.com/python/mypy/issues/17694
@@ -1,2 +1 @@-gh_17694_body_0.py:15: error: Argument 1 to "reduce" has incompatible type "def [_T_co, _S] union(self, self: frozenset[_T_co], *s: Iterable[_S]) -> frozenset[_T_co | _S]"; expected "Callable[[AbstractSet[object], frozenset[str]], AbstractSet[object]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17082: In a function call, if a variable accessed in an iteratable doesn't have an attribute, mypy picks the first overload available, creating spurious further list-item errors.
Labels: bug
Link: https://github.com/python/mypy/issues/17082
@@ -2,11 +2,7 @@
gh_17082_body_0.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_0.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)@@ -2,12 +2,8 @@
gh_17082_body_2.py:19: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 0 has incompatible type "None"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 1 has incompatible type "str"; expected "int" [list-item]
-gh_17082_body_2.py:23: error: List item 0 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:23: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:25: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:25: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:29: error: List item 1 has incompatible type "str"; expected "int" [list-item]-gh_17082_body_2.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 11 errors in 1 file (checked 1 source file)+Found 8 errors in 1 file (checked 1 source file)@@ -2,11 +2,7 @@
gh_17082_body_1.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_1.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)
================================================================================
#17025: Function's argument type inference is affected by the functions return type when in a comprehension
Labels: bug
Link: https://github.com/python/mypy/issues/17025
@@ -1,2 +1 @@-gh_17025_body_0.py:25: error: Argument 1 to "process" has incompatible type "Capsule[int]"; expected "Capsule[int | RuntimeError]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16953: MyPy reports errors when performing nested element access using a ``TypeVar``-parameterized generic type
Labels: bug
Link: https://github.com/python/mypy/issues/16953
@@ -1,6 +1,5 @@
gh_16953_body_0.py:20: note: Revealed type is "gh_16953_body_0.B"
gh_16953_body_0.py:23: note: Revealed type is "gh_16953_body_0.A"
gh_16953_body_0.py:26: note: Revealed type is "int"
-gh_16953_body_0.py:29: error: Argument 1 to "get" has incompatible type "B"; expected "Container[Container[int]]" [arg-type]
gh_16953_body_0.py:30: note: Revealed type is "int"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16522: `Never` inferred in complex situation with variadic callable protocol
Labels: bug, topic-pep-646
Link: https://github.com/python/mypy/issues/16522
@@ -1,5 +1,5 @@-gh_16522_body_0.py:29: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[str, int, set[str]]" [arg-type]-gh_16522_body_0.py:29: note: "NurseryStartFunc[str, int, set[str]].__call__" has type "def __call__(str, int, /, *, task_status: TaskStatus[set[str]]) -> object"+gh_16522_body_0.py:29: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[str, int, Never]" [arg-type]+gh_16522_body_0.py:29: note: "NurseryStartFunc[str, int, Never].__call__" has type "def __call__(str, int, /, *, task_status: TaskStatus[Never]) -> object"
gh_16522_body_0.py:31: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[int, str, Never]" [arg-type]
gh_16522_body_0.py:31: note: "NurseryStartFunc[int, str, Never].__call__" has type "def __call__(int, str, /, *, task_status: TaskStatus[Never]) -> object"
Found 2 errors in 1 file (checked 1 source file)
@@ -1,6 +1,6 @@
gh_16522_body_2.py:25: error: Unused "type: ignore" comment [unused-ignore]
-gh_16522_body_2.py:39: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[str, int, set[str]]" [arg-type]-gh_16522_body_2.py:39: note: "NurseryStartFunc[str, int, set[str]].__call__" has type "def __call__(str, int, /, *, task_status: TaskStatus[set[str]]) -> object"+gh_16522_body_2.py:39: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[str, int, Never]" [arg-type]+gh_16522_body_2.py:39: note: "NurseryStartFunc[str, int, Never].__call__" has type "def __call__(str, int, /, *, task_status: TaskStatus[Never]) -> object"
gh_16522_body_2.py:41: error: Argument 1 to "nursery_start" has incompatible type "def task(a: int, b: str, *, task_status: TaskStatus[set[str]]) -> None"; expected "NurseryStartFunc[int, str, Never]" [arg-type]
gh_16522_body_2.py:41: note: "NurseryStartFunc[int, str, Never].__call__" has type "def __call__(int, str, /, *, task_status: TaskStatus[Never]) -> object"
Found 3 errors in 1 file (checked 1 source file)
================================================================================
#16376: Generic type inferred wrong; curious difference betweer `aiter(f(x))` and `c = f(x); aiter(c)`
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/16376
@@ -1,2 +1 @@-gh_16376_body_1.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_16376_body_0.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16310: Generic matching error when tuple-unpacking result
Labels: bug, topic-type-variables, topic-union-types, topic-inference
Link: https://github.com/python/mypy/issues/16310
@@ -1,2 +1 @@-gh_16310_body_0.py:16: error: Argument 1 to "test" has incompatible type "Test[str, int]"; expected "Test[str, int | str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15462: set.__and__ false-positive involving generic inference
Labels: bug
Link: https://github.com/python/mypy/issues/15462
@@ -1,2 +1 @@-gh_15462_body_0.py:10: error: Argument 1 to "identity" has incompatible type "set[int]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15087: Spurious error when adding two list
Labels: bug
Link: https://github.com/python/mypy/issues/15087
@@ -1,2 +1 @@-gh_15087_body_0.py:19: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_15087_c1515727292_0.py:10: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#12760: error in set unions
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/12760
@@ -1,2 +1 @@-gh_12760_body_0.py:8: error: Argument 1 to "union" of "set" has incompatible type "set[str]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10281: False positive for function that takes a `Callable` as a parameter and returns a `Tuple` of `Union`
Labels: bug
Link: https://github.com/python/mypy/issues/10281
@@ -1,2 +1 @@-gh_10281_body_0.py:17: error: Argument 1 to "test" has incompatible type "Callable[[T], bool]"; expected "Callable[[T | int], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10105: Changing just the return type annotation causes incompatible argument error
Labels: bug
Link: https://github.com/python/mypy/issues/10105
@@ -1,2 +1 @@-gh_10105_body_0.py:54: error: Argument 3 to "transform_process" has incompatible type "Callable[[int], float]"; expected "Callable[[int | None], float | None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#8478: Collapsed Optionals in TypeVar cause weird error messages
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/8478
@@ -1,2 +1 @@-gh_8478_body_0.py:40: error: Argument 2 to "run_tasks" has incompatible type "Callable[[int], int | None]"; expected "Callable[[int], int]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#8275: Type variables in Callables don't unify
Labels: bug, topic-type-variables, priority-1-normal, topic-union-types, false-positive
Link: https://github.com/python/mypy/issues/8275
@@ -2,7 +2,7 @@
gh_8275_body_1.py:26: error: Name "f" is not defined [name-defined]
gh_8275_body_1.py:32: error: Type argument "Error[Ex] | Error[Ex2]" of "Pipe" must be a subtype of "Exception" [type-var]
gh_8275_body_1.py:33: error: Incompatible return value type (got "Pipe[Ex, Ok2]", expected "Pipe[Error[Ex] | Error[Ex2], Ok2]") [return-value]
-gh_8275_body_1.py:33: error: Argument 2 to "either" has incompatible type "Callable[[Ok], Error[Ex2] | Ok2]"; expected "Callable[[object], Error[Ex] | Ok2]" [arg-type]+gh_8275_body_1.py:33: error: Argument 2 to "either" has incompatible type "Callable[[Ok], Error[Ex2] | Ok2]"; expected "Callable[[Ok], Error[Never] | Ok2]" [arg-type]
gh_8275_body_1.py:35: error: Need type annotation for "c" [var-annotated]
gh_8275_body_1.py:35: error: Argument 1 to "Pipe" has incompatible type "Error[ValueError] | float"; expected "Error[Never] | float" [arg-type]
gh_8275_body_1.py:35: error: Unsupported operand types for | ("Pipe[Never, float]" and "Callable[[float], Error[TypeError] | float]") [operator]
================================================================================
#5971: Covariant generic type context results in confusing message with __add__
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/5971
@@ -1,2 +1 @@-gh_5971_body_0.py:17: error: Unsupported operand types for + ("B[Any]" and "B[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5874: Mypy is still too eager about outer context
Labels: bug, topic-type-variables, priority-1-normal, topic-union-types, false-positive
Link: https://github.com/python/mypy/issues/5874
@@ -1,5 +1 @@-gh_5874_body_0.py:10: error: Argument 1 to "add" has incompatible type "list[int]"; expected "list[int | str]" [arg-type]-gh_5874_body_0.py:10: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5874_body_0.py:10: note: Consider using "Sequence" instead, which is covariant-gh_5874_body_0.py:10: error: Argument 2 to "add" has incompatible type "list[str]"; expected "list[int | str]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5311: error in argument when using chained function-call
Labels: bug, topic-type-variables, priority-1-normal, false-positive, topic-overloads
Link: https://github.com/python/mypy/issues/5311
@@ -1,4 +1 @@-gh_5311_body_0.py:8: error: Argument 1 to "maketrans" of "str" has incompatible type "dict[str, str]"; expected "dict[int, str | int | None] | dict[str, str | int | None] | dict[str | int, str | int | None]" [arg-type]-gh_5311_body_0.py:8: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5311_body_0.py:8: note: Consider using "Mapping" instead, which is covariant in the value type-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#4150: Apparent false positive when using reduce with dictionaries
Labels: bug, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/4150
@@ -1,2 +1 @@-gh_4150_c338838754_0.py:10: error: Argument 1 to "r" has incompatible type "Callable[[dict[str, int]], None]"; expected "Callable[[Mapping[str, int]], None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,5 +1,4 @@
gh_4150_body_0.py:8: error: Missing type arguments for generic type "dict" [type-arg]
gh_4150_body_0.py:13: error: Missing type arguments for generic type "dict" [type-arg]
gh_4150_body_0.py:14: error: Missing type arguments for generic type "dict" [type-arg]
-gh_4150_body_0.py:14: error: Argument 1 to "reduce" has incompatible type "Callable[[dict[Any, Any], dict[Any, Any]], dict[Any, Any]]"; expected "Callable[[SupportsKeysAndGetItem[Any, Any], dict[Any, Any]], SupportsKeysAndGetItem[Any, Any]]" [arg-type]-Found 4 errors in 1 file (checked 1 source file)+Found 3 errors in 1 file (checked 1 source file)@@ -1,2 +1 @@-gh_4150_c421674844_0.py:14: error: Argument 1 to "r" has incompatible type "Callable[[list[str], list[str]], list[str]]"; expected "Callable[[Iterable[str], list[str]], Iterable[str]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,3 +1,2 @@
gh_4150_c338572498_0.py:7: error: Missing type arguments for generic type "Dict" [type-arg]
-gh_4150_c338572498_0.py:9: error: Argument 1 to "reduce" has incompatible type "Callable[[dict[str, int], dict[str, int]], dict[str, int]]"; expected "Callable[[SupportsKeysAndGetItem[str, int], dict[Any, Any]], SupportsKeysAndGetItem[str, int]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Found 1 error in 1 file (checked 1 source file)
Found 27 issues with different output.
================================================================================
#21809: Inferred attribute type feeds back as call context, rejecting its own defining assignment
Labels: bug
Link: https://github.com/python/mypy/issues/21809
@@ -1,2 +1 @@-gh_21809_body_0.py:10: error: Argument 1 to "select_one" has incompatible type "dict[str, str]"; expected "Mapping[str | None, str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#21104: error: "key" to "max" has incompatible type
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/21104
@@ -1,3 +1 @@-gh_21104_body_0.py:5: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-gh_21104_body_0.py:13: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_21104_c4182228659_0.py:2: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#20648: ENH: Support slack variables (lower bound emulation)
Labels: feature
Link: https://github.com/python/mypy/issues/20648
@@ -1,7 +1,5 @@-gh_20648_body_0.py:21: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B]" [arg-type]-gh_20648_body_0.py:21: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B]" [arg-type]
gh_20648_body_0.py:22: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:22: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:23: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[object]" [arg-type]
gh_20648_body_0.py:23: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[object]" [arg-type]
-Found 6 errors in 1 file (checked 1 source file)+Found 4 errors in 1 file (checked 1 source file)
================================================================================
#20219: Parameter TypeVar unexpectedly becomes optional when unpacking call results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/20219
@@ -1,4 +1 @@-gh_20219_c3518177325_0.py:6: error: Argument 1 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_c3518177325_0.py:6: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_c3518177325_0.py:6: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,4 +1 @@-gh_20219_body_0.py:16: error: Argument 2 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_body_0.py:16: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_body_0.py:16: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19304: Assigning to intermediate variable changes type checking results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19304
@@ -1,2 +1 @@-gh_19304_body_1.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_c4137608031_0.py:2: error: Argument "key" to "min" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[str]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_0.py:16: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_5.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19259: Argument "key" to "sorted" has incompatible type "Callable…"
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19259
@@ -1,2 +1 @@-gh_19259_body_0.py:23: error: Argument "key" to "sorted" has incompatible type "Callable[[int], int]"; expected "Callable[[int | str], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18689: bogus complaint when checking Callable arguments
Labels: bug, topic-type-variables, topic-type-context
Link: https://github.com/python/mypy/issues/18689
@@ -2,7 +2,6 @@
gh_18689_c2661719816_0.py:15: note: Revealed type is "tuple[float | str, bool]"
gh_18689_c2661719816_0.py:17: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:18: note: Revealed type is "bool"
-gh_18689_c2661719816_0.py:20: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]
gh_18689_c2661719816_0.py:21: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:22: note: Revealed type is "bool"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_18689_body_0.py:14: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18267: mypy incorrectly complains about incompatible type error
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18267
@@ -1,5 +1,3 @@
gh_18267_body_0.py:54: error: Missing type arguments for generic type "Field" [type-arg]
gh_18267_body_0.py:80: error: Missing type arguments for generic type "OneOfField" [type-arg]
-gh_18267_body_0.py:100: error: Argument 1 to "with_" of "OneOfField" has incompatible type "StringField"; expected "Field[str | int, str | int]" [arg-type]-gh_18267_body_0.py:100: error: Argument 2 to "with_" of "OneOfField" has incompatible type "IntegerField"; expected "Field[str | int, str | int]" [arg-type]-Found 4 errors in 1 file (checked 1 source file)+Found 2 errors in 1 file (checked 1 source file)
================================================================================
#18236: False positive `[operator]` on union of dicts with heterogeneous value types
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18236
@@ -1,3 +1,2 @@
gh_18236_body_0.py:5: note: Revealed type is "dict[str, str | None]"
-gh_18236_body_0.py:11: error: Unsupported operand types for | ("dict[str, str]" and "dict[str, str | None]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17694: `functools.reduce` over sets becomes unacceptable when used in a larger expression
Labels: bug
Link: https://github.com/python/mypy/issues/17694
@@ -1,2 +1 @@-gh_17694_body_0.py:15: error: Argument 1 to "reduce" has incompatible type "def [_T_co, _S] union(self, self: frozenset[_T_co], *s: Iterable[_S]) -> frozenset[_T_co | _S]"; expected "Callable[[AbstractSet[object], frozenset[str]], AbstractSet[object]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17082: In a function call, if a variable accessed in an iteratable doesn't have an attribute, mypy picks the first overload available, creating spurious further list-item errors.
Labels: bug
Link: https://github.com/python/mypy/issues/17082
@@ -2,11 +2,7 @@
gh_17082_body_0.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_0.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)@@ -2,12 +2,8 @@
gh_17082_body_2.py:19: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 0 has incompatible type "None"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 1 has incompatible type "str"; expected "int" [list-item]
-gh_17082_body_2.py:23: error: List item 0 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:23: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:25: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:25: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:29: error: List item 1 has incompatible type "str"; expected "int" [list-item]-gh_17082_body_2.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 11 errors in 1 file (checked 1 source file)+Found 8 errors in 1 file (checked 1 source file)@@ -2,11 +2,7 @@
gh_17082_body_1.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_1.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)
================================================================================
#17025: Function's argument type inference is affected by the functions return type when in a comprehension
Labels: bug
Link: https://github.com/python/mypy/issues/17025
@@ -1,2 +1 @@-gh_17025_body_0.py:25: error: Argument 1 to "process" has incompatible type "Capsule[int]"; expected "Capsule[int | RuntimeError]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16953: MyPy reports errors when performing nested element access using a ``TypeVar``-parameterized generic type
Labels: bug
Link: https://github.com/python/mypy/issues/16953
@@ -1,6 +1,5 @@
gh_16953_body_0.py:20: note: Revealed type is "gh_16953_body_0.B"
gh_16953_body_0.py:23: note: Revealed type is "gh_16953_body_0.A"
gh_16953_body_0.py:26: note: Revealed type is "int"
-gh_16953_body_0.py:29: error: Argument 1 to "get" has incompatible type "B"; expected "Container[Container[int]]" [arg-type]
gh_16953_body_0.py:30: note: Revealed type is "int"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16376: Generic type inferred wrong; curious difference betweer `aiter(f(x))` and `c = f(x); aiter(c)`
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/16376
@@ -1,2 +1 @@-gh_16376_body_1.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_16376_body_0.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16310: Generic matching error when tuple-unpacking result
Labels: bug, topic-type-variables, topic-union-types, topic-inference
Link: https://github.com/python/mypy/issues/16310
@@ -1,2 +1 @@-gh_16310_body_0.py:16: error: Argument 1 to "test" has incompatible type "Test[str, int]"; expected "Test[str, int | str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15462: set.__and__ false-positive involving generic inference
Labels: bug
Link: https://github.com/python/mypy/issues/15462
@@ -1,2 +1 @@-gh_15462_body_0.py:10: error: Argument 1 to "identity" has incompatible type "set[int]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15087: Spurious error when adding two list
Labels: bug
Link: https://github.com/python/mypy/issues/15087
@@ -1,2 +1 @@-gh_15087_body_0.py:19: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_15087_c1515727292_0.py:10: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#12760: error in set unions
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/12760
@@ -1,2 +1 @@-gh_12760_body_0.py:8: error: Argument 1 to "union" of "set" has incompatible type "set[str]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10281: False positive for function that takes a `Callable` as a parameter and returns a `Tuple` of `Union`
Labels: bug
Link: https://github.com/python/mypy/issues/10281
@@ -1,2 +1 @@-gh_10281_body_0.py:17: error: Argument 1 to "test" has incompatible type "Callable[[T], bool]"; expected "Callable[[T | int], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10105: Changing just the return type annotation causes incompatible argument error
Labels: bug
Link: https://github.com/python/mypy/issues/10105
@@ -1,2 +1 @@-gh_10105_body_0.py:54: error: Argument 3 to "transform_process" has incompatible type "Callable[[int], float]"; expected "Callable[[int | None], float | None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#8478: Collapsed Optionals in TypeVar cause weird error messages
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/8478
@@ -1,2 +1 @@-gh_8478_body_0.py:40: error: Argument 2 to "run_tasks" has incompatible type "Callable[[int], int | None]"; expected "Callable[[int], int]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5971: Covariant generic type context results in confusing message with __add__
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/5971
@@ -1,2 +1 @@-gh_5971_body_0.py:17: error: Unsupported operand types for + ("B[Any]" and "B[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5874: Mypy is still too eager about outer context
Labels: bug, topic-type-variables, priority-1-normal, topic-union-types, false-positive
Link: https://github.com/python/mypy/issues/5874
@@ -1,5 +1 @@-gh_5874_body_0.py:10: error: Argument 1 to "add" has incompatible type "list[int]"; expected "list[int | str]" [arg-type]-gh_5874_body_0.py:10: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5874_body_0.py:10: note: Consider using "Sequence" instead, which is covariant-gh_5874_body_0.py:10: error: Argument 2 to "add" has incompatible type "list[str]"; expected "list[int | str]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5311: error in argument when using chained function-call
Labels: bug, topic-type-variables, priority-1-normal, false-positive, topic-overloads
Link: https://github.com/python/mypy/issues/5311
@@ -1,4 +1 @@-gh_5311_body_0.py:8: error: Argument 1 to "maketrans" of "str" has incompatible type "dict[str, str]"; expected "dict[int, str | int | None] | dict[str, str | int | None] | dict[str | int, str | int | None]" [arg-type]-gh_5311_body_0.py:8: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5311_body_0.py:8: note: Consider using "Mapping" instead, which is covariant in the value type-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#4150: Apparent false positive when using reduce with dictionaries
Labels: bug, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/4150
@@ -1,2 +1 @@-gh_4150_c338838754_0.py:10: error: Argument 1 to "r" has incompatible type "Callable[[dict[str, int]], None]"; expected "Callable[[Mapping[str, int]], None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_4150_c421674844_0.py:14: error: Argument 1 to "r" has incompatible type "Callable[[list[str], list[str]], list[str]]"; expected "Callable[[Iterable[str], list[str]], Iterable[str]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,3 +1,2 @@
gh_4150_c338572498_0.py:7: error: Missing type arguments for generic type "Dict" [type-arg]
-gh_4150_c338572498_0.py:9: error: Argument 1 to "reduce" has incompatible type "Callable[[dict[str, int], dict[str, int]], dict[str, int]]"; expected "Callable[[SupportsKeysAndGetItem[str, int], dict[Any, Any]], SupportsKeysAndGetItem[str, int]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Found 1 error in 1 file (checked 1 source file)
Found 25 issues with different output.
================================================================================
#21809: Inferred attribute type feeds back as call context, rejecting its own defining assignment
Labels: bug
Link: https://github.com/python/mypy/issues/21809
@@ -1,2 +1 @@-gh_21809_body_0.py:10: error: Argument 1 to "select_one" has incompatible type "dict[str, str]"; expected "Mapping[str | None, str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#21104: error: "key" to "max" has incompatible type
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/21104
@@ -1,3 +1 @@-gh_21104_body_0.py:5: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-gh_21104_body_0.py:13: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_21104_c4182228659_0.py:2: error: Argument "key" to "max" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[int]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#20648: ENH: Support slack variables (lower bound emulation)
Labels: feature
Link: https://github.com/python/mypy/issues/20648
@@ -1,7 +1,5 @@-gh_20648_body_0.py:21: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B]" [arg-type]-gh_20648_body_0.py:21: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B]" [arg-type]
gh_20648_body_0.py:22: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:22: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[A | B | C]" [arg-type]
gh_20648_body_0.py:23: error: Argument 1 to "concat_vecs" has incompatible type "Vec[A]"; expected "Vec[object]" [arg-type]
gh_20648_body_0.py:23: error: Argument 2 to "concat_vecs" has incompatible type "Vec[B]"; expected "Vec[object]" [arg-type]
-Found 6 errors in 1 file (checked 1 source file)+Found 4 errors in 1 file (checked 1 source file)
================================================================================
#20219: Parameter TypeVar unexpectedly becomes optional when unpacking call results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/20219
@@ -1,4 +1 @@-gh_20219_c3518177325_0.py:6: error: Argument 1 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_c3518177325_0.py:6: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_c3518177325_0.py:6: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,4 +1 @@-gh_20219_body_0.py:16: error: Argument 2 to "fun" has incompatible type "list[int]"; expected "list[int | None]" [arg-type]-gh_20219_body_0.py:16: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_20219_body_0.py:16: note: Consider using "Sequence" instead, which is covariant-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19304: Assigning to intermediate variable changes type checking results
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19304
@@ -1,2 +1 @@-gh_19304_body_1.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_c4137608031_0.py:2: error: Argument "key" to "min" has incompatible type "Callable[[Sized], int]"; expected "Callable[[Iterable[str]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_0.py:16: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_19304_body_5.py:19: error: Unsupported operand types for + ("Vec[int]" and "Vec[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#19259: Argument "key" to "sorted" has incompatible type "Callable…"
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/19259
@@ -1,2 +1 @@-gh_19259_body_0.py:23: error: Argument "key" to "sorted" has incompatible type "Callable[[int], int]"; expected "Callable[[int | str], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18689: bogus complaint when checking Callable arguments
Labels: bug, topic-type-variables, topic-type-context
Link: https://github.com/python/mypy/issues/18689
@@ -2,7 +2,6 @@
gh_18689_c2661719816_0.py:15: note: Revealed type is "tuple[float | str, bool]"
gh_18689_c2661719816_0.py:17: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:18: note: Revealed type is "bool"
-gh_18689_c2661719816_0.py:20: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]
gh_18689_c2661719816_0.py:21: note: Revealed type is "float | str"
gh_18689_c2661719816_0.py:22: note: Revealed type is "bool"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_18689_body_0.py:14: error: Argument 1 to "test" has incompatible type "Callable[[str], bool]"; expected "Callable[[float | str], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#18267: mypy incorrectly complains about incompatible type error
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18267
@@ -1,5 +1,3 @@
gh_18267_body_0.py:54: error: Missing type arguments for generic type "Field" [type-arg]
gh_18267_body_0.py:80: error: Missing type arguments for generic type "OneOfField" [type-arg]
-gh_18267_body_0.py:100: error: Argument 1 to "with_" of "OneOfField" has incompatible type "StringField"; expected "Field[str | int, str | int]" [arg-type]-gh_18267_body_0.py:100: error: Argument 2 to "with_" of "OneOfField" has incompatible type "IntegerField"; expected "Field[str | int, str | int]" [arg-type]-Found 4 errors in 1 file (checked 1 source file)+Found 2 errors in 1 file (checked 1 source file)
================================================================================
#18236: False positive `[operator]` on union of dicts with heterogeneous value types
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/18236
@@ -1,3 +1,2 @@
gh_18236_body_0.py:5: note: Revealed type is "dict[str, str | None]"
-gh_18236_body_0.py:11: error: Unsupported operand types for | ("dict[str, str]" and "dict[str, str | None]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17694: `functools.reduce` over sets becomes unacceptable when used in a larger expression
Labels: bug
Link: https://github.com/python/mypy/issues/17694
@@ -1,2 +1 @@-gh_17694_body_0.py:15: error: Argument 1 to "reduce" has incompatible type "def [_T_co, _S] union(self, self: frozenset[_T_co], *s: Iterable[_S]) -> frozenset[_T_co | _S]"; expected "Callable[[AbstractSet[object], frozenset[str]], AbstractSet[object]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#17082: In a function call, if a variable accessed in an iteratable doesn't have an attribute, mypy picks the first overload available, creating spurious further list-item errors.
Labels: bug
Link: https://github.com/python/mypy/issues/17082
@@ -2,11 +2,7 @@
gh_17082_body_0.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_0.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_0.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_0.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_0.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_0.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)@@ -2,12 +2,8 @@
gh_17082_body_2.py:19: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 0 has incompatible type "None"; expected "int" [list-item]
gh_17082_body_2.py:20: error: List item 1 has incompatible type "str"; expected "int" [list-item]
-gh_17082_body_2.py:23: error: List item 0 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:23: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_2.py:25: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:25: error: List item 1 has incompatible type "str"; expected "int" [list-item]
gh_17082_body_2.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_2.py:29: error: List item 1 has incompatible type "str"; expected "int" [list-item]-gh_17082_body_2.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 11 errors in 1 file (checked 1 source file)+Found 8 errors in 1 file (checked 1 source file)@@ -2,11 +2,7 @@
gh_17082_body_1.py:19: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:20: error: List item 0 has incompatible type "None"; expected "str" [list-item]
gh_17082_body_1.py:23: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:24: error: List item 0 has incompatible type "int"; expected "str" [list-item]
gh_17082_body_1.py:24: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:25: error: "int" has no attribute "x" [attr-defined]
gh_17082_body_1.py:26: error: "int" has no attribute "x" [attr-defined]
-gh_17082_body_1.py:26: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: error: List item 1 has incompatible type "int"; expected "str" [list-item]-gh_17082_body_1.py:29: note: Error code "list-item" not covered by "type: ignore[attr-defined]" comment-Found 10 errors in 1 file (checked 1 source file)+Found 7 errors in 1 file (checked 1 source file)
================================================================================
#17025: Function's argument type inference is affected by the functions return type when in a comprehension
Labels: bug
Link: https://github.com/python/mypy/issues/17025
@@ -1,2 +1 @@-gh_17025_body_0.py:25: error: Argument 1 to "process" has incompatible type "Capsule[int]"; expected "Capsule[int | RuntimeError]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16953: MyPy reports errors when performing nested element access using a ``TypeVar``-parameterized generic type
Labels: bug
Link: https://github.com/python/mypy/issues/16953
@@ -1,6 +1,5 @@
gh_16953_body_0.py:20: note: Revealed type is "gh_16953_body_0.B"
gh_16953_body_0.py:23: note: Revealed type is "gh_16953_body_0.A"
gh_16953_body_0.py:26: note: Revealed type is "int"
-gh_16953_body_0.py:29: error: Argument 1 to "get" has incompatible type "B"; expected "Container[Container[int]]" [arg-type]
gh_16953_body_0.py:30: note: Revealed type is "int"
-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16376: Generic type inferred wrong; curious difference betweer `aiter(f(x))` and `c = f(x); aiter(c)`
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/16376
@@ -1,2 +1 @@-gh_16376_body_1.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_16376_body_0.py:24: error: Argument 1 to "coro_to_aiter" has incompatible type "Callable[[ProducerContext[int]], Coroutine[Any, Any, None]]"; expected "Callable[[ProducerContext[int | StartedToken]], Coroutine[Any, Any, None]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#16310: Generic matching error when tuple-unpacking result
Labels: bug, topic-type-variables, topic-union-types, topic-inference
Link: https://github.com/python/mypy/issues/16310
@@ -1,2 +1 @@-gh_16310_body_0.py:16: error: Argument 1 to "test" has incompatible type "Test[str, int]"; expected "Test[str, int | str]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15462: set.__and__ false-positive involving generic inference
Labels: bug
Link: https://github.com/python/mypy/issues/15462
@@ -1,2 +1 @@-gh_15462_body_0.py:10: error: Argument 1 to "identity" has incompatible type "set[int]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#15087: Spurious error when adding two list
Labels: bug
Link: https://github.com/python/mypy/issues/15087
@@ -1,2 +1 @@-gh_15087_body_0.py:19: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_15087_c1515727292_0.py:10: error: Unsupported operand types for + ("list[A]" and "list[B]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#12760: error in set unions
Labels: bug, topic-type-context
Link: https://github.com/python/mypy/issues/12760
@@ -1,2 +1 @@-gh_12760_body_0.py:8: error: Argument 1 to "union" of "set" has incompatible type "set[str]"; expected "set[object]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10281: False positive for function that takes a `Callable` as a parameter and returns a `Tuple` of `Union`
Labels: bug
Link: https://github.com/python/mypy/issues/10281
@@ -1,2 +1 @@-gh_10281_body_0.py:17: error: Argument 1 to "test" has incompatible type "Callable[[T], bool]"; expected "Callable[[T | int], bool]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#10105: Changing just the return type annotation causes incompatible argument error
Labels: bug
Link: https://github.com/python/mypy/issues/10105
@@ -1,2 +1 @@-gh_10105_body_0.py:54: error: Argument 3 to "transform_process" has incompatible type "Callable[[int], float]"; expected "Callable[[int | None], float | None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#8478: Collapsed Optionals in TypeVar cause weird error messages
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/8478
@@ -1,2 +1 @@-gh_8478_body_0.py:40: error: Argument 2 to "run_tasks" has incompatible type "Callable[[int], int | None]"; expected "Callable[[int], int]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5971: Covariant generic type context results in confusing message with __add__
Labels: bug, topic-type-variables, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/5971
@@ -1,2 +1 @@-gh_5971_body_0.py:17: error: Unsupported operand types for + ("B[Any]" and "B[int]") [operator]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5874: Mypy is still too eager about outer context
Labels: bug, topic-type-variables, priority-1-normal, topic-union-types, false-positive
Link: https://github.com/python/mypy/issues/5874
@@ -1,5 +1 @@-gh_5874_body_0.py:10: error: Argument 1 to "add" has incompatible type "list[int]"; expected "list[int | str]" [arg-type]-gh_5874_body_0.py:10: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5874_body_0.py:10: note: Consider using "Sequence" instead, which is covariant-gh_5874_body_0.py:10: error: Argument 2 to "add" has incompatible type "list[str]"; expected "list[int | str]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#5311: error in argument when using chained function-call
Labels: bug, topic-type-variables, priority-1-normal, false-positive, topic-overloads
Link: https://github.com/python/mypy/issues/5311
@@ -1,4 +1 @@-gh_5311_body_0.py:8: error: Argument 1 to "maketrans" of "str" has incompatible type "dict[str, str]"; expected "dict[int, str | int | None] | dict[str, str | int | None] | dict[str | int, str | int | None]" [arg-type]-gh_5311_body_0.py:8: note: "dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance-gh_5311_body_0.py:8: note: Consider using "Mapping" instead, which is covariant in the value type-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file
================================================================================
#4150: Apparent false positive when using reduce with dictionaries
Labels: bug, priority-1-normal, false-positive
Link: https://github.com/python/mypy/issues/4150
@@ -1,2 +1 @@-gh_4150_c338838754_0.py:10: error: Argument 1 to "r" has incompatible type "Callable[[dict[str, int]], None]"; expected "Callable[[Mapping[str, int]], None]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,2 +1 @@-gh_4150_c421674844_0.py:14: error: Argument 1 to "r" has incompatible type "Callable[[list[str], list[str]], list[str]]"; expected "Callable[[Iterable[str], list[str]], Iterable[str]]" [arg-type]-Found 1 error in 1 file (checked 1 source file)+Success: no issues found in 1 source file@@ -1,3 +1,2 @@
gh_4150_c338572498_0.py:7: error: Missing type arguments for generic type "Dict" [type-arg]
-gh_4150_c338572498_0.py:9: error: Argument 1 to "reduce" has incompatible type "Callable[[dict[str, int], dict[str, int]], dict[str, int]]"; expected "Callable[[SupportsKeysAndGetItem[str, int], dict[Any, Any]], SupportsKeysAndGetItem[str, int]]" [arg-type]-Found 2 errors in 1 file (checked 1 source file)+Found 1 error in 1 file (checked 1 source file)
Found 25 issues with different output.
Activity
github-actions commentedon Aug 25, 2026
Check results are ready!
PR link: python/mypy#21803
rheard commentedon Aug 25, 2026
Re-check plz.
randolf-scholz commentedon Aug 25, 2026
@rheard You just have to open a new issue with
Check #pr_numberas the titlegithub-actions commentedon Aug 25, 2026
Check results are ready!
PR link: python/mypy#21803
github-actions commentedon Aug 25, 2026
Check results are ready!
PR link: python/mypy#21803