You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Work around not having real flow-control analysis
This commit is contained in:
@@ -900,11 +900,13 @@ class Scanner2(Scanner):
|
|||||||
'start': start-3,
|
'start': start-3,
|
||||||
'end': pre_rtarget}
|
'end': pre_rtarget}
|
||||||
|
|
||||||
if self.version == 2.7:
|
elif self.version == 2.7:
|
||||||
self.structs.append({'type': 'if-then',
|
self.structs.append({'type': 'if-then',
|
||||||
'start': start-3,
|
'start': start-3,
|
||||||
'end': pre_rtarget})
|
'end': pre_rtarget})
|
||||||
else:
|
|
||||||
|
# FIXME: this is yet another case were we need dominators.
|
||||||
|
if pre_rtarget not in self.linestartoffsets or self.version < 2.7:
|
||||||
self.not_continue.add(pre_rtarget)
|
self.not_continue.add(pre_rtarget)
|
||||||
|
|
||||||
if rtarget < end:
|
if rtarget < end:
|
||||||
|
@@ -411,7 +411,8 @@ def make_function2(self, node, isLambda, nested=1, codeNode=None):
|
|||||||
if code_has_star_star_arg(code):
|
if code_has_star_star_arg(code):
|
||||||
if argc > 0:
|
if argc > 0:
|
||||||
self.write(', ')
|
self.write(', ')
|
||||||
self.write('**%s' % code.co_varnames[argc + kw_pairs])
|
if argc + kw_pairs > 0:
|
||||||
|
self.write('**%s' % code.co_varnames[argc + kw_pairs])
|
||||||
|
|
||||||
if isLambda:
|
if isLambda:
|
||||||
self.write(": ")
|
self.write(": ")
|
||||||
|
Reference in New Issue
Block a user