Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test-data/unit/check-varargs.test
Original file line number Diff line number Diff line change
Expand Up @@ -414,23 +414,23 @@ main:4: error: Argument 2 to "f" has incompatible type "*List[A]"; expected "B"
main:5: error: Argument 3 to "f" has incompatible type "*List[A]"; expected "B"
main:6: error: Argument 1 to "f" has incompatible type "*Tuple[A, A, B]"; expected "Optional[B]"

[case testVarArgsAfterKeywordArgInCall1-skip]
[case testVarArgsAfterKeywordArgInCall1]
# see: mypy issue #2729
def f(x: int, y: str) -> None: pass
f(x=1, *[2])
[builtins fixtures/list.pyi]
[out]
main:2: error: "f" gets multiple values for keyword argument "x"
main:2: error: Argument 2 to "f" has incompatible type *List[int]; expected "str"
main:3: error: "f" gets multiple values for keyword argument "x"
main:3: error: Argument 1 to "f" has incompatible type "*List[int]"; expected "str"

[case testVarArgsAfterKeywordArgInCall2-skip]
[case testVarArgsAfterKeywordArgInCall2]
# see: mypy issue #2729
def f(x: int, y: str) -> None: pass
f(y='x', *[1])
[builtins fixtures/list.pyi]
[out]
main:2: error: "f" gets multiple values for keyword argument "y"
main:2: error: Argument 2 to "f" has incompatible type *List[int]; expected "str"
main:3: error: "f" gets multiple values for keyword argument "y"
main:3: error: Argument 1 to "f" has incompatible type "*List[int]"; expected "str"

[case testVarArgsAfterKeywordArgInCall3]
def f(x: int, y: str) -> None: pass
Expand Down