Closed
Description
Bug Report
from typing import Callable, Concatenate, TypeAlias
intfun: TypeAlias = Callable[Concatenate[int, ...], None] # ✘ Unexpected "..." [misc]
https://mypy-play.net/?mypy=master&python=3.11&gist=f4ba9e669549fae3b1a75e02af311db2
Expected Behavior
According to docs https://docs.python.org/3/library/typing.html#typing.Concatenate:
The last parameter to Concatenate must be a ParamSpec or ellipsis (...).
This change deviates from PEP 612 and was introduced in bpo-44791
- bpo-44791: Accept ellipsis as the last argument of Concatenate cpython#30969
- Substitution of ParamSpec in Concatenate cpython#88954
- Callable with variadic fixed arguments that doesn't mean *args typing#1301
- Make any callable compatible with (*args: Any, **kwargs: Any)? #5876
- https://stackoverflow.com/questions/74893354/is-literal-ellipsis-really-valid-as-paramspec-last-argument