File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -5115,14 +5115,11 @@ def visit_for_stmt(self, s: ForStmt) -> None:
51155115 supertype = self .named_type ("typing.Generator" ).type
51165116 super_instance = map_instance_to_supertype (proper_iter_type , supertype )
51175117 if isinstance (get_proper_type (super_instance .args [2 ]), UninhabitedType ):
5118- exit_condition = NameExpr ("True" )
5119- exit_condition .fullname = "builtins.True"
5118+ exit_condition = IntExpr (1 )
51205119 else :
5121- exit_condition = NameExpr ("False" )
5122- exit_condition .fullname = "builtins.False"
5120+ exit_condition = IntExpr (0 )
51235121 else :
5124- exit_condition = NameExpr ("False" )
5125- exit_condition .fullname = "builtins.False"
5122+ exit_condition = IntExpr (0 )
51265123
51275124 self .accept_loop (
51285125 s .body ,
You can’t perform that action at this time.
0 commit comments