You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
DRY Python 2.7 scanner more
This commit is contained in:
@@ -214,12 +214,6 @@ class Scanner27(scan.Scanner):
|
||||
rv.append(Token(replace[offset], oparg, pattr, offset, linestart))
|
||||
return rv, customize
|
||||
|
||||
def op_size(self, op):
|
||||
if op < self.opc.HAVE_ARGUMENT:
|
||||
return 1
|
||||
else:
|
||||
return 3
|
||||
|
||||
def build_stmt_indices(self):
|
||||
code = self.code
|
||||
start = 0
|
||||
@@ -300,15 +294,6 @@ class Scanner27(scan.Scanner):
|
||||
i = s
|
||||
slist += [end] * (end-len(slist))
|
||||
|
||||
def remove_mid_line_ifs(self, ifs):
|
||||
filtered = []
|
||||
for i in ifs:
|
||||
if self.lines[i].l_no == self.lines[i+3].l_no:
|
||||
if self.code[self.prev[self.lines[i].next]] in (PJIT, PJIF):
|
||||
continue
|
||||
filtered.append(i)
|
||||
return filtered
|
||||
|
||||
def next_except_jump(self, start):
|
||||
'''
|
||||
Return the next jump that was generated by an except SomeException:
|
||||
|
Reference in New Issue
Block a user