Skip to content

Commit d851c88

Browse files
authored
Fix unpacking error in kwargs for bad functions
1 parent 5ffe606 commit d851c88

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test-data/unit/check-typevar-tuple.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,15 +2191,15 @@ g(1, 2, 3) # E: Missing named argument "a" for "g" \
21912191

21922192
def bad(
21932193
*args: Unpack[Keywords], # E: "Keywords" cannot be unpacked (must be tuple or TypeVarTuple)
2194-
**kwargs: Unpack[Ints], # E: Unpack item in ** argument must be a TypedDict
2194+
**kwargs: Unpack[Ints], # E: Unpack item in ** parameter must be a TypedDict
21952195
) -> None: ...
21962196
reveal_type(bad) # N: Revealed type is "def (*args: Any, **kwargs: Any)"
21972197

21982198
def bad2(
21992199
one: int,
22002200
*args: Unpack[Keywords], # E: "Keywords" cannot be unpacked (must be tuple or TypeVarTuple)
22012201
other: str = "no",
2202-
**kwargs: Unpack[Ints], # E: Unpack item in ** argument must be a TypedDict
2202+
**kwargs: Unpack[Ints], # E: Unpack item in ** parameter must be a TypedDict
22032203
) -> None: ...
22042204
reveal_type(bad2) # N: Revealed type is "def (one: builtins.int, *args: Any, other: builtins.str =, **kwargs: Any)"
22052205
[builtins fixtures/dict.pyi]

0 commit comments

Comments
 (0)