Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Check tuples of abstract types#15366
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ikonst commentedJun 12, 2023
First impression: shouldn't there be something else that recurses into a tuple already to validate types of items, so we could avoid teaching |
sobolevn commentedJun 12, 2023
I don't see a clean way to do that. |
JukkaL commentedJul 12, 2023
What about just leaving a TODO comment about this, in case somebody figures out a good way to do that? |
JukkaL left a comment
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.
Uh oh!
There was an error while loading.Please reload this page.
sobolevn commentedJul 12, 2023
@JukkaL thanks for the review! I've left a TODO note for future work :) |
According tomypy_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