-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Check tuples of abstract types #15366
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
First impression: shouldn't there be something else that recurses into a tuple already to validate types of items, so we could avoid teaching |
I don't see a clean way to do that. |
What about just leaving a TODO comment about this, in case somebody figures out a good way to do that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if this doesn't fully solve the issue, this seems like a reasonably incremental improvement, though it would be good to add a comment explaining that this is incomplete (and perhaps why), as I mentioned in my other comment.
@JukkaL thanks for the review! I've left a TODO note for future work :) |
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
The PR is quite simple (and I would like to keep it this way):
type[]
typetuple[type[], ...]
typeThere might be other types that we want to add in the future here:
TypedDictType
, etc?But, let's do it one by one, because smaller PRs are easier to merge :)
Closes #15264