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

Don’t leak unreachability from lambda body to surrounding scope #17287

Merged
merged 1 commit into from
May 26, 2024

Conversation

andersk
Copy link
Contributor

@andersk andersk commented May 24, 2024

Fixes python#17254.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

This comment has been minimized.

@andersk andersk force-pushed the lambda-noreturn branch 2 times, most recently from 7d15f32 to 2f3a09f Compare May 24, 2024 21:14
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The false positive should be easy to fix, I can open a PR

@hauntsaninja hauntsaninja merged commit 5059ffd into python:master May 26, 2024
34 of 35 checks passed
@hauntsaninja
Copy link
Collaborator

#17294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mypy does not check the code after the line with lambda function that calls NoReturn function
2 participants