Skip to content

Commit

Permalink
Fix dump
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Nov 17, 2021
1 parent b9d77e1 commit ad98f81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions grammar/asdl_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,9 @@ class NodeVisitorNotImplemented(Exception):
def checkinstance(a, b, opt=False):
if opt and a is None:
return
from {} import dump
if not isinstance(a, b):
if isinstance(a, AST):
a_dump = dump(a)
a_dump = a
else:
a_dump = a
print("Wrong instance: %s, types: a=%s; b=%s" % (a_dump, type(a), b))
Expand Down

0 comments on commit ad98f81

Please sign in to comment.