@@ -3768,23 +3768,31 @@ class C:
37683768def defer() -> int:
37693769 return 1
37703770
3771- [case testMissingPositionalArgumentShiftedTypes ]
3771+ [case testMissingPositionalArgumentTypeMismatch ]
37723772def f(x: int, y: str, z: bytes, aa: int) -> None: ...
37733773
37743774f(1, b'x', 1)
37753775[builtins fixtures/primitives.pyi]
37763776[out]
3777- main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str" (did you forget argument "y"?)
3777+ main:3: error: Argument 2 to "f" has incompatible type "bytes"; expected "str"
37783778
3779- [case testMissingPositionalArgumentShiftedTypesFirstArg ]
3779+ [case testMissingPositionalArgumentTypeMismatchFirst ]
37803780def f(x: int, y: str, z: bytes) -> None: ...
37813781
37823782f("hello", b'x')
37833783[builtins fixtures/primitives.pyi]
37843784[out]
3785- main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int" (did you forget argument "x"?)
3785+ main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
3786+
3787+ [case testMissingPositionalArgumentManyArgs]
3788+ def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...]) -> None: ...
3789+
3790+ f(1, 1.5, [1, 2, 3], ("a", "b"))
3791+ [builtins fixtures/list.pyi]
3792+ [out]
3793+ main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str"
37863794
3787- [case testMissingPositionalArgumentNoShift ]
3795+ [case testMissingPositionalArgumentNoPattern ]
37883796def f(x: int, y: str, z: bytes) -> None: ...
37893797
37903798f("wrong", 123)
@@ -3794,15 +3802,17 @@ main:3: error: Missing positional argument "z" in call to "f"
37943802main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
37953803main:3: error: Argument 2 to "f" has incompatible type "int"; expected "str"
37963804
3797- [case testMissingPositionalArgumentShiftedTypesManyArgs ]
3798- def f(a: int, b: str, c: float, d: list[int], e: tuple[str, ...] ) -> None: ...
3805+ [case testMissingMultiplePositionalArguments ]
3806+ def f(a: int, b: str, c: float, d: list[int]) -> None: ...
37993807
3800- f(1, 1 .5, [1, 2, 3], ("a", "b") )
3808+ f(1.5, [1, 2, 3])
38013809[builtins fixtures/list.pyi]
38023810[out]
3803- main:3: error: Argument 2 to "f" has incompatible type "float"; expected "str" (did you forget argument "b"?)
3811+ main:3: error: Missing positional arguments "c", "d" in call to "f"
3812+ main:3: error: Argument 1 to "f" has incompatible type "float"; expected "int"
3813+ main:3: error: Argument 2 to "f" has incompatible type "list[int]"; expected "str"
38043814
3805- [case testMissingPositionalArgumentShiftedWithDefaults ]
3815+ [case testMissingPositionalArgumentWithDefaults ]
38063816def f(x: int, y: str, z: bytes = b'default') -> None: ...
38073817
38083818f("hello")
@@ -3811,7 +3821,7 @@ f("hello")
38113821main:3: error: Missing positional argument "y" in call to "f"
38123822main:3: error: Argument 1 to "f" has incompatible type "str"; expected "int"
38133823
3814- [case testMissingPositionalArgumentShiftedWithStarArgs ]
3824+ [case testMissingPositionalArgumentWithStarArgs ]
38153825def f(x: int, y: str, z: bytes, *args: int) -> None: ...
38163826
38173827f("hello", b'x')
0 commit comments