-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix FlatMapTuple typehint bug #33307
Conversation
R: @jrmccluskey |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, 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.
LGTM mod the linting fixes
str
getting turned into a generic type is interesting, I will see what I can dig up next week as far as the underlying bug
I can't seem to get this isorted correctly. It's not a part of the pre-commit hook and the isort version isn't compatible with my py3.11. @jrmccluskey would you mind doing it before merging if it's easy for you env? |
Have you tried to manually change the import orders?
|
(fixes #33014)
FlatMapTuple
throws false positive type hint errors in certain situations, e.g.raises the following exception:
This is a downstream effect of a bug in the
trivial_inference.py
code. I couldn't really figure out the underlying bug but we can work around it by adding atuple
coercion before unpacking inFlatMapTuple
.I've created a spinoff issue for the underlying inference issue: #33308