mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +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
|
||||
|
||||
count = defaultdict(int)
|
||||
out = sys.stdout
|
||||
|
||||
for root, dirs, files in os.walk(path):
|
||||
# ignore subdirs controlled by svn
|
||||
|
@ -212,8 +211,7 @@ Options: -v verbose (print all checked file names)
|
|||
csev = checker.severity
|
||||
if csev >= severity:
|
||||
for lno, msg in checker(fn, lines):
|
||||
print('[%d] %s:%d: %s' % (csev, fn, lno, msg),
|
||||
file=out)
|
||||
print('[%d] %s:%d: %s' % (csev, fn, lno, msg))
|
||||
count[csev] += 1
|
||||
if verbose:
|
||||
print()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue