You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
More stringent transform test for assert
This commit is contained in:
@@ -90,7 +90,11 @@ class TreeTransform(GenericASTTraversal, object):
|
||||
if stmts in ("c_stmts",) and len(stmts) == 1:
|
||||
stmt = stmts[0]
|
||||
raise_stmt = stmt[0]
|
||||
if raise_stmt == "raise_stmt1" and len(testexpr[0]) == 2:
|
||||
if (
|
||||
raise_stmt == "raise_stmt1"
|
||||
and len(testexpr[0]) == 2
|
||||
and raise_stmt.first_child().pattr == "AssertionError"
|
||||
):
|
||||
assert_expr = testexpr[0][0]
|
||||
assert_expr.kind = "assert_expr"
|
||||
jump_cond = testexpr[0][1]
|
||||
|
Reference in New Issue
Block a user