Closed
Description
Bug Report
I face issues, when using ParamSpec.args as a tuple and ParamSpec.kwargs as a dict
To Reproduce
Execute mypy on the following code
from typing_extensions import ParamSpec
from typing import Callable
P = ParamSpec("P")
def foo(func: Callable[P, None]):
def _inner(*args: P.args, **kwargs: P.kwargs):
x = kwargs.pop("x")
Expected Behavior
It works
Actual Behavior
Error: test.py:8:13: error: "P.kwargs" has no attribute "pop" [attr-defined]
Your Environment
- Mypy version used: 0.941
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini
(and other config files): none - Python version used: 3.7.1
- Operating system and version: Linux