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? |
JukkaL
left a comment
There was a problem hiding this comment.
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