-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errors
Description
*Notes:
- mypy test.py
- mypy 1.19.1
- Python 3.14.0
Using type application with a function call gets the error message as shown below:
def func[T](x: T) -> T:
return x
func[int](100) # Errorerror: Type application is only supported for generic classes
But type application is also supported for generic type aliases as shown below:
type TA[T] = list[T]
v: TA[int] # No errorSo the error message should be as shown below:
error: Type application is only supported for generic classes and type aliases
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errors