Closed as not planned
Description
Bug Report
The declarations of F
, G
and H
all result in the following error:
The first argument to Callable must be a list of types, parameter specification, or "..." [valid-type]
Despite the first argument to the callable being a parameter specification.
from typing import Callable, ParamSpec, TypeVar, Coroutine, Any, Union
P = ParamSpec('P')
F = TypeVar('F', bound=Callable[P, Any])
G = TypeVar('G', bound=Callable[P, Coroutine[Any, Any, Any]])
H = TypeVar('H', bound=Union[Callable[P, Any], Callable[P, Coroutine[Any, Any, Any]]])
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&gist=191e47b4afd74e307a3042dfedac77d4
Expected Behavior
Either these should pass type checking, or the error message should be updated to indicate what the problem actually is.
Your Environment
- Mypy version used: 1.0.0
- Python version used: 3.11