You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Fix 2.x compatibility
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
--- uncompyle6/parsers/reducecheck/ifelsestmt.py
|
||||
+++ uncompyle6/parsers/reducecheck/ifelsestmt.py
|
||||
@@ -6,6 +6,7 @@ from uncompyle6.scanners.tok import Token
|
||||
def ifelsestmt(
|
||||
self, lhs: str, n: int, rule, ast, tokens: list, first: int, last: int
|
||||
) -> bool:
|
||||
+
|
||||
if (last + 1) < n and tokens[last + 1] == "COME_FROM_LOOP":
|
||||
# ifelsestmt jumped outside of loop. No good.
|
||||
return True
|
@@ -1,8 +1,6 @@
|
||||
# Copyright (c) 2020 Rocky Bernstein
|
||||
|
||||
def ifstmt(
|
||||
self, lhs, n, rule, ast, tokens: list, first, last
|
||||
) -> bool:
|
||||
def ifstmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if lhs == "ifstmtl":
|
||||
if last == n:
|
||||
last -= 1
|
||||
|
Reference in New Issue
Block a user