Skip to content

Commit dabc70e

Browse files
committed
fix: inst.argval can be a tuple for sometimes
1 parent 0772f91 commit dabc70e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,10 @@ def check_code(self, code, nodes, decorators, check_names):
14391439

14401440
if isinstance(node, ast.Name) and inst.opname != "CALL_INTRINSIC_1" and inst.argval not in ("__classdict__","__classdictcell__","__static_attributes__"):
14411441
# CALL_INTRINSIC_1 and some special names are excuded here because they are generated by cpython for some synthetic code
1442-
assert mangled_name(node) == inst.argval
1442+
if isinstance(inst.argval,tuple):
1443+
assert mangled_name(node) in inst.argval
1444+
else:
1445+
assert mangled_name(node) == inst.argval
14431446

14441447
if ex.decorator:
14451448
decorators[(node.lineno, node.name)].append(ex.decorator)

0 commit comments

Comments
 (0)