@@ -3704,23 +3704,31 @@ kwargs: dict[str, object]
37043704foo(**kwargs) # E: Argument 1 to "foo" has incompatible type "**dict[str, object]"; expected "P"
37053705[builtins fixtures/dict.pyi]
37063706
3707- [case testMissingPositionalArgumentShiftedTypes ]
3707+ [case testMissingPositionalArgumentTypeMismatch ]
37083708def f(x: int, y: str, z: bytes, aa: int) -> None: ...
37093709
37103710f(1, b'x', 1)
37113711[builtins fixtures/primitives.pyi]
37123712[out]
3713- main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str" (did you forget argument "y"?)
3713+ main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str"
37143714
3715- [case testMissingPositionalArgumentShiftedTypesFirstArg ]
3715+ [case testMissingPositionalArgumentTypeMismatchFirst ]
37163716def f(x: int, y: str, z: bytes) -> None: ...
37173717
37183718f("hello", b'x')
37193719[builtins fixtures/primitives.pyi]
37203720[out]
3721- main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int" (did you forget argument "x"?)
3721+ main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
3722+
3723+ [case testMissingPositionalArgumentManyArgs]
3724+ def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...]) -> None: ...
3725+
3726+ f(1, 1.5, [1, 2, 3], ("a", "b"))
3727+ [builtins fixtures/list.pyi]
3728+ [out]
3729+ main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str"
37223730
3723- [case testMissingPositionalArgumentNoShift ]
3731+ [case testMissingPositionalArgumentNoPattern ]
37243732def f(x: int, y: str, z: bytes) -> None: ...
37253733
37263734f("wrong", 123)
@@ -3730,15 +3738,17 @@ main:3: error: Missing positional argument "z" in call to "f"
37303738main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
37313739main:3: error: Argument 2 to "f" has incompatible type "int"; expected "str"
37323740
3733- [case testMissingPositionalArgumentShiftedTypesManyArgs ]
3734- def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...] ) -> None: ...
3741+ [case testMissingMultiplePositionalArguments ]
3742+ def f(a: int, b: str, c: float, d: list[int]) -> None: ...
37353743
3736- f(1, 1 .5, [1, 2, 3], ("a", "b") )
3744+ f(1.5, [1, 2, 3])
37373745[builtins fixtures/list.pyi]
37383746[out]
3739- main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str" (did you forget argument "b"?)
3747+ main:3: error: Missing positional arguments "c", "d" in call to "f"
3748+ main:3: error: Argument 1 to "f" has incompatible type "float"; expected "int"
3749+ main:3: error: Argument 2 to "f" has incompatible type "list[int]"; expected "str"
37403750
3741- [case testMissingPositionalArgumentShiftedWithDefaults ]
3751+ [case testMissingPositionalArgumentWithDefaults ]
37423752def f(x: int, y: str, z: bytes = b'default') -> None: ...
37433753
37443754f("hello")
@@ -3747,7 +3757,7 @@ f("hello")
37473757main:3: error: Missing positional argument "y" in call to "f"
37483758main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
37493759
3750- [case testMissingPositionalArgumentShiftedWithStarArgs ]
3760+ [case testMissingPositionalArgumentWithStarArgs ]
37513761def f(x: int, y: str, z: bytes, *args: int) -> None: ...
37523762
37533763f("hello", b'x')
0 commit comments