Closed
Description
Bug Report
ParamSpec
checker does not enforce that *args
or **kwargs
are only provided once.
The following code (or playground) should not check:
To Reproduce
[case testRepeatedArgs]
from typing_extensions import ParamSpec
from typing import Callable
P = ParamSpec("P")
def run(func: Callable[P, None], *args: P.args, **kwargs: P.kwargs) -> None:
func(*args, *args, **kwargs)
func(*args, **kwargs, **kwargs)
[builtins fixtures/paramspec.pyi]
Expected Behavior
Should produce errors for both func
calls.
Actual Behavior
Green output: 0 errors.
Your Environment
- Mypy version used: master, 1.13.0, 1.0.0
- Mypy command-line flags:
--strict
or without it - Mypy configuration options from
mypy.ini
(and other config files): N/A - Python version used: 3.11 (irrelevant)