-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve handling of and
/or
where the result is a type union
#312
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
achidlow
force-pushed
the
fix-nested-bool-contexts
branch
from
September 13, 2024 08:33
9f0820a
to
0a9c8ee
Compare
achidlow
force-pushed
the
fix-nested-bool-contexts
branch
4 times, most recently
from
September 17, 2024 04:12
cf541c1
to
64941de
Compare
achidlow
changed the title
Fix handling of type unions in nested bool contexts
Improve handling of Sep 17, 2024
and
/or
where the result is a type union
achidlow
force-pushed
the
fix-nested-bool-contexts
branch
from
September 17, 2024 06:46
64941de
to
000af6d
Compare
daniel-makerx
approved these changes
Sep 17, 2024
…with binary boolean operators, and improve error messaging when handling of type unions in nested bool contexts --------- also: - allow dummy values to be constructed for literal-only pytypes - single spot where "unexpected type" error message is defined, which also gives a special message in case of a union, just in case the function actually does support a union argument as is the case with some intrinsics etc - prevent parsing function bodies when the return type is invalid, which can cause secondary errors which might be confusing and overshadow the root problem - supress "expression result is ignored" warning when using `typing.assert_type`
achidlow
force-pushed
the
fix-nested-bool-contexts
branch
from
September 17, 2024 07:59
000af6d
to
27fa8c1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expand handling of literal expressions to allow combining them with binary boolean operators, and improve error messaging when handling of type unions in nested bool contexts (fixes #145)
Also:
typing.assert_type