44
55
66def ifstmts_jump (self , lhs , n , rule , ast , tokens , first , last ):
7-
87 if len (rule [1 ]) <= 1 or not ast :
98 return False
109
@@ -24,7 +23,7 @@ def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
2423 pop_jump_index -= 1
2524
2625 # FIXME: something is fishy when and EXTENDED ARG is needed before the
27- # pop_jump_index instruction to get the argment . In this case, the
26+ # pop_jump_index instruction to get the argument . In this case, the
2827 # _ifsmtst_jump can jump to a spot beyond the come_froms.
2928 # That is going on in the non-EXTENDED_ARG case is that the POP_JUMP_IF
3029 # jumps to a JUMP_(FORWARD) which is changed into an EXTENDED_ARG POP_JUMP_IF
@@ -34,16 +33,11 @@ def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
3433
3534 pop_jump_offset = tokens [pop_jump_index ].off2int (prefer_last = False )
3635 if isinstance (come_froms , Token ):
37- if (
38- tokens [pop_jump_index ].attr < pop_jump_offset and ast [0 ] != "pass"
39- ):
36+ if tokens [pop_jump_index ].attr < pop_jump_offset and ast [0 ] != "pass" :
4037 # This is a jump backwards to a loop. All bets are off here when there the
4138 # unless statement is "pass" which has no instructions associated with it.
4239 return False
43- return (
44- come_froms .attr is not None
45- and pop_jump_offset > come_froms .attr
46- )
40+ return come_froms .attr is not None and pop_jump_offset > come_froms .attr
4741
4842 elif len (come_froms ) == 0 :
4943 return False
0 commit comments