Skip to content

Get *args and **kwargs autocompletion but with modified types (wrapped in generic containers) #1646

Answered by Daverball
Vince-LD asked this question in Q&A
Discussion options

You must be logged in to vote

This sort of thing requires something like the previously proposed Map construct. Unfortunately no concrete proposal or PEP has come out of it yet, so the thing you're doing right now is pretty much the only thing you can do. SQLAlchemy used a very similar workaround before TypeVarTuple was available for their Row type, which had a value property that just returned self but cast it from Row[T] to T.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Vince-LD
Comment options

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