-
Notifications
You must be signed in to change notification settings - Fork 9
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
TypeVar Support #119
Projects
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Typical currently stumbles over classes which make use of TypeVar in their definitions, such as Generics. At the very least, we should be able to treat anonymous (unbound) typevars as "Any", and at best, map bound TypeVars correctly.
Implementation
Resolver.annotation
, to determine whether this should be treated as a Union or Any. If the TypeVar is constrained, treat it as a Union for resolution, otherwise, an Any:For consideration - do we want to create a NewType for this Union?
We probably also want to retain a flag on the
ResolvedAnnotation
that signals this came from a TypeVar.The text was updated successfully, but these errors were encountered: