We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd8690 commit ec6b98dCopy full SHA for ec6b98d
1 file changed
mypy/checkexpr.py
@@ -5495,7 +5495,8 @@ def visit_lambda_expr(self, e: LambdaExpr) -> Type:
5495
# Lambdas can have more than one element in body,
5496
# when we add "fictional" AssignmentStatement nodes, like in:
5497
# `lambda (a, b): a`
5498
- self.chk.accept(e.body)
+ with self.chk.binder.frame_context(can_skip=True, fall_through=0):
5499
+ self.chk.accept(e.body)
5500
5501
# Only type check the return expression, not the return statement.
5502
# There's no useful type context.
0 commit comments