-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Labels
bugmypy got something wrongmypy got something wrong
Description
Bug Report
I believe mypy's handling of ParamSpecs is slightly too restrictive. Currently, it validates that there are no args or kwargs after a ParamSpec.args argument other than **kwargs. I believe it's tolerable to have kwargs follow a ParamSpec.args
Related to #18278
To Reproduce
def f5(f: Callable[P, int], *args: P.args, extra_regular_arg: int, **kwargs: P.kwargs) -> int: ... # E: Arguments not allowed after ParamSpec.args
def f6(f: Callable[P, int], *args: P.args, extra_kwarg: int = 123, **kwargs: P.kwargs) -> int: ... # E: Arguments not allowed after ParamSpec.argsExpected Behavior
The first function above should continue to fail, while the second function should not throw an error
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong