You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
Profiling workarounds, more coverage ...
test/Makefile: more grammar checking. Update python versions 10_del.pyc add test of DEL_GLOBAL check_ast.py, pysource.py: Profileing workarounds
This commit is contained in:
@@ -2239,6 +2239,10 @@ def deparse_code(version, co, out=sys.stdout, showasm=None, showast=False,
|
||||
isTopLevel = co.co_name == '<module>'
|
||||
deparsed.ast = deparsed.build_ast(tokens, customize, isTopLevel=isTopLevel)
|
||||
|
||||
#### XXX workaround for profiling
|
||||
if deparsed.ast is None:
|
||||
return None
|
||||
|
||||
assert deparsed.ast == 'stmts', 'Should have parsed grammar start'
|
||||
|
||||
del tokens # save memory
|
||||
|
Reference in New Issue
Block a user