File tree 1 file changed +4
-8
lines changed 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -192,8 +192,7 @@ def pop_frame(self, fall_through: int = 0) -> Frame:
192
192
193
193
self .last_pop_changed = self .update_from_options (options )
194
194
self .last_pop_breaking_out = self .breaking_out
195
- if fall_through :
196
- self .breaking_out = False
195
+ self .breaking_out = False
197
196
198
197
return result
199
198
@@ -1692,18 +1691,15 @@ def visit_if_stmt(self, s: IfStmt) -> Type:
1692
1691
1693
1692
# Might also want to issue a warning
1694
1693
# print("Warning: isinstance always true")
1695
- if breaking_out :
1696
- self .binder .breaking_out = True
1697
- return None
1698
1694
break
1699
1695
else : # Didn't break => can't prove one of the conditions is always true
1700
1696
with self .binder .frame_context (2 ):
1701
1697
if s .else_body :
1702
1698
self .accept (s .else_body )
1703
1699
breaking_out = breaking_out and self .binder .last_pop_breaking_out
1704
- if breaking_out :
1705
- self .binder .breaking_out = True
1706
- return None
1700
+ if breaking_out :
1701
+ self .binder .breaking_out = True
1702
+ return None
1707
1703
1708
1704
def visit_while_stmt (self , s : WhileStmt ) -> Type :
1709
1705
"""Type check a while statement."""
You can’t perform that action at this time.
0 commit comments