-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typevars becoming types with typevars doesn't work #1236
Comments
Here's what's happening here:
I think the mypythonic thing to do here is to just implement this subtyping check: A callable is a subtype of a generic callable if it is so after the generic callable is instantiated at fresh ("skolem") types. |
Thanks for tracking this down! I agree, implementing that subtyping check sounds like the right fix here. |
Thanks! That sounds like a great analysis. Can you pull of the fix without
more help?
|
I have what should be a fix, but encountered #1335 while testing it. |
This ended up just amounting to removing a check! Fixes python#1236.
This ended up amounting to just removing a check! Fixes python#1236.
This ended up amounting to just removing a check! Fixes python#1236. But something is still not right when using type variables constrained to a list of values; added a failing test for that case.
This ended up amounting to just removing a check! Fixes python#1236. But something is still not right when using type variables constrained to a list of values; added a failing test for that case.
This ended up amounting to just removing a check! Fixes #1236. But something is still not right when using type variables constrained to a list of values; added a failing test for that case.
has the confusing error:
This is most commonly seen when decorating functions with TypeVars.
The text was updated successfully, but these errors were encountered: