Fixed: Only re-calculate if something changed

This commit is contained in:
coffeedogs 2018-05-16 02:29:25 +01:00
parent 81777e29c9
commit 5b21baed21
No known key found for this signature in database
GPG Key ID: 9D818C503D0B7E70

View File

@ -158,8 +158,8 @@ def code_quality(verbose=True, details=False, fix=False, filename=None, top=10):
if fix:
for item in sort_and_slice(results, top):
autopep8(item['path_to_file'])
# Recalculate results after autopep8 to surprise the user the least
results = get_tool_results(file_list)
# Recalculate results after autopep8 to surprise the user the least
results = get_tool_results(file_list)
print_results(results, top, verbose, details)
sys.exit(sum([item['total_violations'] for item in results]))