Skip to content

Is using a TypeAliasType to simply forward a TypeVar supposed to be approved? #5526

Closed Answered by erictraut
cainmagi asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this should work fine. In fact, you shouldn't need to use typing.TypeAliasType. The older-style typing.TypeAlias should work fine here. There's currently a bug in pyright where proxy: TypeAlias = T does not work correctly. I'll fix this for the next release.

proxy: TypeAlias = T

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@cainmagi
Comment options

@cainmagi
Comment options

@erictraut
Comment options

@cainmagi
Comment options

@hmc-cs-mdrissi
Comment options

Answer selected by cainmagi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants