Skip to content

Type hinting a class that wraps function with __call__ method that conditionally modifies returned type #1933

Answered by hauntsaninja
soneill-pure asked this question in Q&A
Discussion options

You must be logged in to vote

You could try using overloads on __call__ where the overloads match on generic self

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@soneill-pure
Comment options

Answer selected by soneill-pure
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