Skip to content

Commit

Permalink
Fix lost error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
sterliakov committed Sep 25, 2024
1 parent 558a35f commit 01390c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test-data/unit/check-parameter-specification.test
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,8 @@ def run3(func: Callable[Concatenate[int, P], T], *args: P.args, **kwargs: P.kwar

def run_bad(func: Callable[Concatenate[int, P], T], *args: P.args, **kwargs: P.kwargs) -> T:
func2 = partial(func, *args) # E: Argument 1 has incompatible type "*P.args"; expected "int"
return func2(1, **kwargs) # E: Too many arguments
return func2(1, **kwargs) # E: Too many arguments \
# E: Argument 1 has incompatible type "int"; expected "P.args"

def run_bad2(func: Callable[Concatenate[int, P], T], *args: P.args, **kwargs: P.kwargs) -> T:
func2 = partial(func, 1, *args)
Expand All @@ -2376,4 +2377,6 @@ def run_bad3(func: Callable[Concatenate[int, P], T], *args: P.args, **kwargs: P.
return func2(1, **kwargs) # E: Too many arguments \
# E: Argument 1 has incompatible type "int"; expected "P.args"



[builtins fixtures/paramspec.pyi]

0 comments on commit 01390c0

Please sign in to comment.