You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Lint
This commit is contained in:
@@ -492,7 +492,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write("\n" + self.indent + INDENT_PER_LEVEL[:-1])
|
||||
return self.line_number
|
||||
|
||||
|
||||
def customize_for_version(self, is_pypy, version):
|
||||
if is_pypy:
|
||||
########################
|
||||
@@ -537,7 +536,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
'raise_stmt2': ( '%|raise %c from %c\n', 0, 1),
|
||||
})
|
||||
|
||||
|
||||
if version < 2.0:
|
||||
TABLE_DIRECT.update({
|
||||
'importlist': ( '%C', (0, maxint, ', ') ),
|
||||
@@ -622,7 +620,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.prune() # stop recursing
|
||||
self.n_mkfunc_annotate = n_mkfunc_annotate
|
||||
|
||||
|
||||
if version >= 3.4:
|
||||
########################
|
||||
# Python 3.4+ Additions
|
||||
@@ -1149,7 +1146,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
assert n == 'lc_body'
|
||||
self.write( '[ ')
|
||||
|
||||
|
||||
if self.version >= 2.7:
|
||||
expr = n[0]
|
||||
list_iter = node[-1]
|
||||
@@ -1337,7 +1333,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
n = ast[iter_index]
|
||||
assert n == 'list_iter', n
|
||||
|
||||
## FIXME: I'm not totally sure this is right.
|
||||
# FIXME: I'm not totally sure this is right.
|
||||
|
||||
# find innermost node
|
||||
if_node = None
|
||||
@@ -2139,7 +2135,6 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.println()
|
||||
del ast[i]
|
||||
|
||||
|
||||
# the function defining a class normally returns locals(); we
|
||||
# don't want this to show up in the source, thus remove the node
|
||||
if len(ast) > 0 and ast[-1][0] == RETURN_LOCALS:
|
||||
|
Reference in New Issue
Block a user