-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
crashtopic-mypycmypyc bugsmypyc bugstopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate
Description
Bug Report
When using mypyc on code using ParamSpec.kwargs, a crash occurs
To Reproduce
from __future__ import annotations
from typing import Any, Callable, ParamSpec, TypeVar
PARAM = ParamSpec("PARAM")
RET = TypeVar("RET")
def decorator() -> Callable[[Callable[PARAM, RET]], Callable[PARAM, RET]]:
def _wrapper(function: Callable[PARAM, RET]) -> Callable[PARAM, RET]:
def _inner(*args: PARAM.args, **kwargs: PARAM.kwargs) -> Any:
data = {key: arg for key, arg in kwargs.items()}
function(*args, **kwargs)
return _inner
return _wrapper
Expected Behavior
no crash
Actual Behavior
Traceback (most recent call last):
foo.py:13: AssertionError: PARAM.kwargs`-1
Your Environment
- Mypy version used: mypy 1.15.0 (compiled: yes)
- Mypy command-line flags: n/a
- Mypy configuration options from
mypy.ini
(and other config files): n/a - Python version used: 3.13.0
Metadata
Metadata
Assignees
Labels
crashtopic-mypycmypyc bugsmypyc bugstopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate