mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Make tool compatible with 2.x and 3.x.
This commit is contained in:
parent
25bfc55afe
commit
420ca77e73
1 changed files with 1 additions and 3 deletions
|
@ -169,7 +169,6 @@ Options: -v verbose (print all checked file names)
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
count = defaultdict(int)
|
count = defaultdict(int)
|
||||||
out = sys.stdout
|
|
||||||
|
|
||||||
for root, dirs, files in os.walk(path):
|
for root, dirs, files in os.walk(path):
|
||||||
# ignore subdirs controlled by svn
|
# ignore subdirs controlled by svn
|
||||||
|
@ -212,8 +211,7 @@ Options: -v verbose (print all checked file names)
|
||||||
csev = checker.severity
|
csev = checker.severity
|
||||||
if csev >= severity:
|
if csev >= severity:
|
||||||
for lno, msg in checker(fn, lines):
|
for lno, msg in checker(fn, lines):
|
||||||
print('[%d] %s:%d: %s' % (csev, fn, lno, msg),
|
print('[%d] %s:%d: %s' % (csev, fn, lno, msg))
|
||||||
file=out)
|
|
||||||
count[csev] += 1
|
count[csev] += 1
|
||||||
if verbose:
|
if verbose:
|
||||||
print()
|
print()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue