Skip to content

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

Merged
hauntsaninja merged 1 commit into
python:masterfrom
andersk:lambda-noreturn
May 26, 2024
Merged

Don’t leak unreachability from lambda body to surrounding scope#17287
hauntsaninja merged 1 commit into
python:masterfrom
andersk:lambda-noreturn

Conversation

@andersk

@andersk andersk commented May 24, 2024

Copy link
Copy Markdown
Contributor

Fixes python#17254.

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

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
@github-actions

Copy link
Copy Markdown
Contributor

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

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

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
@hauntsaninja

Copy link
Copy Markdown
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