mypy icon indicating copy to clipboard operation
mypy copied to clipboard

`type A[T] = T; reveal_type(A[int])` shows `typing.TypeAliasType` rather than `types.GenericAlias`

Open jorenham opened this issue 1 month ago • 0 comments

type A[T] = T
reveal_type(A[int])  # ❌ typing.TypeAliasType

yet

>>> type A[T] = T
>>> type(A[int])
<class 'types.GenericAlias'>

on master and v1.18.2

https://mypy-play.net/?mypy=latest&python=3.12&gist=fa2132200cfca28caf586f0ccc5dc26c

jorenham avatar Nov 28 '25 00:11 jorenham