Skip to content
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

Attempt to fix bool re-narrowing #11845

Closed
wants to merge 3 commits into from
Closed

Attempt to fix bool re-narrowing #11845

wants to merge 3 commits into from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Dec 25, 2021

Let's see what mypy_primer and CI will say.

Closes #11839
Refs #10389

@github-actions

This comment has been minimized.

@sobolevn
Copy link
Member Author

sobolevn commented Dec 25, 2021

For some reason all builds with mypyc-compiled mypy fail. While regular tests pass. No idea why.

@github-actions

This comment has been minimized.

@sobolevn
Copy link
Member Author

Ok, I will try something else.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

graphql-core (https://github.com/graphql-python/graphql-core)
+ tests/type/test_definition.py:1115: error: Argument 1 to "isnan" has incompatible type "None"; expected "Union[SupportsFloat, SupportsIndex]"
+ tests/language/test_visitor.py:73: error: Value of type "Node" is not indexable

zulip (https://github.com/zulip/zulip)
+ zerver/lib/events.py:495: error: Statement is unreachable  [unreachable]
+ zerver/lib/events.py:513: error: Statement is unreachable  [unreachable]
+ zerver/lib/events.py:534: error: Statement is unreachable  [unreachable]
+ zerver/lib/events.py:600: error: Statement is unreachable  [unreachable]
+ zerver/tests/test_events.py:495: error: Statement is unreachable  [unreachable]

core (https://github.com/home-assistant/core)
- homeassistant/config_entries.py:474: error: Returning Any from function declared to return "bool"  [no-any-return]

@sobolevn
Copy link
Member Author

See #11839 (comment)

@sobolevn sobolevn closed this Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression with type narrowing of bool
1 participant