Run all Python code through autopep8
Run all Python code through autopep8 as follows: autopep8 -ri --ignore=E261,E262,E302 --max-line-length 1000 . E261 or E262 would cause spaces after a comment's hash sign to be squashed. Since some of the comments in cppcheck's Python code have space-indented code examples, not ignoring E261 or E262 would wreck the formatting of those examples. E302 prevents autopep8 from adding some blank lines. setting --max-line-width ensures no line will be wrapped.
This commit is contained in:
parent
6f3ae7132e
commit
97b43c78ce
|
@ -89,14 +89,14 @@ def removeAllExceptResults():
|
|||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||
elif filename != 'results.txt':
|
||||
os.remove(filename)
|
||||
except WindowsError, err:
|
||||
except WindowsError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
continue
|
||||
except OSError, err:
|
||||
except OSError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
|
|
|
@ -90,14 +90,14 @@ def removeAll():
|
|||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||
else:
|
||||
os.remove(filename)
|
||||
except WindowsError, err:
|
||||
except WindowsError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
continue
|
||||
except OSError, err:
|
||||
except OSError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
|
|
|
@ -89,14 +89,14 @@ def removeAllExceptResults():
|
|||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||
elif filename != 'results.txt':
|
||||
os.remove(filename)
|
||||
except WindowsError, err:
|
||||
except WindowsError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
print(err)
|
||||
sys.exit(1)
|
||||
continue
|
||||
except OSError, err:
|
||||
except OSError as err:
|
||||
time.sleep(30)
|
||||
if count == 0:
|
||||
print('Failed to cleanup files/folders')
|
||||
|
|
|
@ -68,5 +68,3 @@ foldernum = 0
|
|||
while True:
|
||||
daca2(foldernum)
|
||||
foldernum = foldernum + 1
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue