-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Make infer_condition_value recognize the whole truth table #18944
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… any stmt - there are no error reports. Make MYPY_* vs ALWAYS_* consistent.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_docs_extraction.py:104: error: Incompatible types in assignment (expression has type "list[str] | None", variable has type "list[str]") [assignment]
|
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.
Thanks, looks good!
I'm not sure if there is any good reason for this. Maybe try changing this and see what mypy primer looks like? |
Fixes #18901.
Side question: why don't we support boolean literals there (as in
if True or sys.platform == "linux"
)? Is it an escape hatch to make mypy check some {platform,version}-dependent code on all {platform,version}s?