@@ -3751,23 +3751,31 @@ kwargs: dict[str, object]
37513751foo(**kwargs) # E: Argument 1 to "foo" has incompatible type "**dict[str, object]"; expected "P"
37523752[builtins fixtures/dict.pyi]
37533753
3754- [case testMissingPositionalArgumentShiftedTypes ]
3754+ [case testMissingPositionalArgumentTypeMismatch ]
37553755def f(x: int, y: str, z: bytes, aa: int) -> None: ...
37563756
37573757f(1, b'x', 1)
37583758[builtins fixtures/primitives.pyi]
37593759[out]
3760- main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str" (did you forget argument "y"?)
3760+ main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str"
37613761
3762- [case testMissingPositionalArgumentShiftedTypesFirstArg ]
3762+ [case testMissingPositionalArgumentTypeMismatchFirst ]
37633763def f(x: int, y: str, z: bytes) -> None: ...
37643764
37653765f("hello", b'x')
37663766[builtins fixtures/primitives.pyi]
37673767[out]
3768- main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int" (did you forget argument "x"?)
3768+ main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
3769+
3770+ [case testMissingPositionalArgumentManyArgs]
3771+ def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...]) -> None: ...
3772+
3773+ f(1, 1.5, [1, 2, 3], ("a", "b"))
3774+ [builtins fixtures/list.pyi]
3775+ [out]
3776+ main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str"
37693777
3770- [case testMissingPositionalArgumentNoShift ]
3778+ [case testMissingPositionalArgumentNoPattern ]
37713779def f(x: int, y: str, z: bytes) -> None: ...
37723780
37733781f("wrong", 123)
@@ -3777,15 +3785,17 @@ main:3: error: Missing positional argument "z" in call to "f"
37773785main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
37783786main:3: error: Argument 2 to "f" has incompatible type "int"; expected "str"
37793787
3780- [case testMissingPositionalArgumentShiftedTypesManyArgs ]
3781- def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...] ) -> None: ...
3788+ [case testMissingMultiplePositionalArguments ]
3789+ def f(a: int, b: str, c: float, d: list[int]) -> None: ...
37823790
3783- f(1, 1 .5, [1, 2, 3], ("a", "b") )
3791+ f(1.5, [1, 2, 3])
37843792[builtins fixtures/list.pyi]
37853793[out]
3786- main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str" (did you forget argument "b"?)
3794+ main:3: error: Missing positional arguments "c", "d" in call to "f"
3795+ main:3: error: Argument 1 to "f" has incompatible type "float"; expected "int"
3796+ main:3: error: Argument 2 to "f" has incompatible type "list[int]"; expected "str"
37873797
3788- [case testMissingPositionalArgumentShiftedWithDefaults ]
3798+ [case testMissingPositionalArgumentWithDefaults ]
37893799def f(x: int, y: str, z: bytes = b'default') -> None: ...
37903800
37913801f("hello")
@@ -3794,7 +3804,7 @@ f("hello")
37943804main:3: error: Missing positional argument "y" in call to "f"
37953805main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
37963806
3797- [case testMissingPositionalArgumentShiftedWithStarArgs ]
3807+ [case testMissingPositionalArgumentWithStarArgs ]
37983808def f(x: int, y: str, z: bytes, *args: int) -> None: ...
37993809
38003810f("hello", b'x')
0 commit comments