Merge pull request #747 from 3adev/apply-autopep8
Run all Python code through autopep8
This commit is contained in:
commit
5b6c684905
|
@ -89,14 +89,14 @@ def removeAllExceptResults():
|
||||||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||||
elif filename != 'results.txt':
|
elif filename != 'results.txt':
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
except WindowsError, err:
|
except WindowsError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
print(err)
|
print(err)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
continue
|
continue
|
||||||
except OSError, err:
|
except OSError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
|
|
|
@ -90,14 +90,14 @@ def removeAll():
|
||||||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||||
else:
|
else:
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
except WindowsError, err:
|
except WindowsError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
print(err)
|
print(err)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
continue
|
continue
|
||||||
except OSError, err:
|
except OSError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
|
|
|
@ -89,14 +89,14 @@ def removeAllExceptResults():
|
||||||
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
shutil.rmtree(filename, onerror=handleRemoveReadonly)
|
||||||
elif filename != 'results.txt':
|
elif filename != 'results.txt':
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
except WindowsError, err:
|
except WindowsError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
print(err)
|
print(err)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
continue
|
continue
|
||||||
except OSError, err:
|
except OSError as err:
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
print('Failed to cleanup files/folders')
|
print('Failed to cleanup files/folders')
|
||||||
|
|
|
@ -84,7 +84,7 @@ class MatchCompiler:
|
||||||
if tok == '%any%':
|
if tok == '%any%':
|
||||||
return 'true'
|
return 'true'
|
||||||
elif tok == '%assign%':
|
elif tok == '%assign%':
|
||||||
return 'tok->isAssignmentOp()'
|
return 'tok->isAssignmentOp()'
|
||||||
elif tok == '%bool%':
|
elif tok == '%bool%':
|
||||||
return 'tok->isBoolean()'
|
return 'tok->isBoolean()'
|
||||||
elif tok == '%char%':
|
elif tok == '%char%':
|
||||||
|
|
|
@ -59,14 +59,12 @@ def daca2(foldernum):
|
||||||
# run cppcheck addons
|
# run cppcheck addons
|
||||||
subprocess.call(['rm', '-rf', os.path.expanduser('~/daca2/' + folder)])
|
subprocess.call(['rm', '-rf', os.path.expanduser('~/daca2/' + folder)])
|
||||||
subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), folder, '--rev=' + rev])
|
subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), folder, '--rev=' + rev])
|
||||||
upload(os.path.expanduser('~/daca2/'+folder+'/results.txt'), 'evidente/addons-'+folder+'.txt')
|
upload(os.path.expanduser('~/daca2/' + folder + '/results.txt'), 'evidente/addons-' + folder + '.txt')
|
||||||
subprocess.call(['rm', '-rf', os.path.expanduser('~/daca2/lib' + folder)])
|
subprocess.call(['rm', '-rf', os.path.expanduser('~/daca2/lib' + folder)])
|
||||||
subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), 'lib' + folder, '--rev=' + rev])
|
subprocess.call(['nice', '--adjustment=19', 'python', os.path.expanduser('~/cppcheck/tools/daca2-addons.py'), 'lib' + folder, '--rev=' + rev])
|
||||||
upload(os.path.expanduser('~/daca2/lib'+folder+'/results.txt'), 'evidente/addons-lib'+folder+'.txt')
|
upload(os.path.expanduser('~/daca2/lib' + folder + '/results.txt'), 'evidente/addons-lib' + folder + '.txt')
|
||||||
|
|
||||||
foldernum = 0
|
foldernum = 0
|
||||||
while True:
|
while True:
|
||||||
daca2(foldernum)
|
daca2(foldernum)
|
||||||
foldernum = foldernum + 1
|
foldernum = foldernum + 1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue