You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
More AST checking
Small fixes in output format
This commit is contained in:
@@ -12,9 +12,9 @@ def checker(ast, in_loop, errors):
|
||||
in_loop = in_loop or ast.type in ('while1stmt', 'whileTruestmt',
|
||||
'whilestmt', 'whileelsestmt',
|
||||
'for_block')
|
||||
if ast.type == 'augassign1' and ast[0][0] == 'and':
|
||||
text = str(ast[0])
|
||||
error_text = '\n# improper augmented assigment:\n#\t' + '\n# '.join(text.split("\n"))
|
||||
if ast.type in ('augassign1', 'augassign2') and ast[0][0] == 'and':
|
||||
text = str(ast)
|
||||
error_text = '\n# improper augmented assigment (e.g. +=, *=, ...):\n#\t' + '\n# '.join(text.split("\n")) + '\n'
|
||||
errors.append(error_text)
|
||||
|
||||
for node in ast:
|
||||
|
Reference in New Issue
Block a user