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 some 3.7+ "if"/"and" logic bugs
This commit is contained in:
@@ -96,7 +96,8 @@ class TreeTransform(GenericASTTraversal, object):
|
||||
jump_cond = testexpr[0][1]
|
||||
expr = raise_stmt[0]
|
||||
RAISE_VARARGS_1 = raise_stmt[1]
|
||||
if expr[0] == "call":
|
||||
call = expr[0]
|
||||
if call == "call":
|
||||
# ifstmt
|
||||
# 0. testexpr
|
||||
# testtrue (2)
|
||||
@@ -116,7 +117,8 @@ class TreeTransform(GenericASTTraversal, object):
|
||||
assert jump_cond == "jmp_false"
|
||||
kind = "assert2not"
|
||||
|
||||
call = expr[0]
|
||||
if call[0] != "LOAD_ASSERT":
|
||||
return node
|
||||
LOAD_ASSERT = call[0]
|
||||
if isinstance(call[1], SyntaxTree):
|
||||
expr = call[1][0]
|
||||
|
Reference in New Issue
Block a user