style: fix stupid bugs
--HG-- extra : convert_revision : ef3dcc3a160eb19a6c4fcdcd411d392aa42e4efe
This commit is contained in:
parent
c27e23f2e8
commit
9aed27efb3
1 changed files with 6 additions and 5 deletions
|
@ -85,7 +85,7 @@ def checkwhite_line(line):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def checkwhite(filename):
|
def checkwhite(filename):
|
||||||
if not whitespace_file(filename)
|
if not whitespace_file(filename):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -115,7 +115,7 @@ def fixwhite_line(line, tabsize):
|
||||||
return line.rstrip() + '\n'
|
return line.rstrip() + '\n'
|
||||||
|
|
||||||
def fixwhite(filename, tabsize, fixonly=None):
|
def fixwhite(filename, tabsize, fixonly=None):
|
||||||
if not whitespace_file(filename)
|
if not whitespace_file(filename):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -390,9 +390,10 @@ if __name__ == '__main__':
|
||||||
fixwhite(filename, tabsize)
|
fixwhite(filename, tabsize)
|
||||||
elif command == 'chkwhite':
|
elif command == 'chkwhite':
|
||||||
for filename in args:
|
for filename in args:
|
||||||
line = checkwhite(filename)
|
for line,num in checkwhite(filename):
|
||||||
if line:
|
print 'invalid whitespace: %s:%d' % (filename, num)
|
||||||
print 'invalid whitespace at %s:%d' % (filename, line)
|
if verbose:
|
||||||
|
print '>>%s<<' % line[:-1]
|
||||||
elif command == 'chkformat':
|
elif command == 'chkformat':
|
||||||
stats = ValidationStats()
|
stats = ValidationStats()
|
||||||
for filename in files:
|
for filename in files:
|
||||||
|
|
Loading…
Reference in a new issue