mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 12:16:53 +00:00
more py3 fixes
This commit is contained in:
parent
232fc33060
commit
0ac0cec20f
3 changed files with 4 additions and 3 deletions
|
|
@ -182,7 +182,8 @@ def get_code_complexity(code, min=7, filename='stdin'):
|
|||
complex = []
|
||||
try:
|
||||
ast = parse(code)
|
||||
except AttributeError as e:
|
||||
except AttributeError:
|
||||
e = sys.exc_info()[1]
|
||||
sys.stderr.write("Unable to parse %s: %s\n" % (filename, e))
|
||||
return 0
|
||||
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ class Checker(object):
|
|||
finally:
|
||||
self.nodeDepth -= 1
|
||||
if self.traceTree:
|
||||
print (' ' * self.nodeDepth + 'end ' + node.__class__.__name__)
|
||||
print(' ' * self.nodeDepth + 'end ' + node.__class__.__name__)
|
||||
|
||||
def ignore(self, node):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ def main():
|
|||
|
||||
def _get_files(repo, **kwargs):
|
||||
seen = set()
|
||||
for rev in xrange(repo[kwargs['node']], len(repo)):
|
||||
for rev in range(repo[kwargs['node']], len(repo)):
|
||||
for file_ in repo[rev].files():
|
||||
file_ = os.path.join(repo.root, file_)
|
||||
if file_ in seen or not os.path.exists(file_):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue