diff --git a/tools/donate-cpu-server.py b/tools/donate-cpu-server.py index 06bb7fbfb..5f80173a7 100644 --- a/tools/donate-cpu-server.py +++ b/tools/donate-cpu-server.py @@ -504,7 +504,7 @@ def check_library_report(result_path, message_id): 'Function' html += '\n' - function_counts = dict() + function_counts = {} for filename in glob.glob(result_path + '/*'): if not os.path.isfile(filename): continue @@ -521,7 +521,7 @@ def check_library_report(result_path, message_id): function_name = line[(line.find(': Function ') + len(': Function ')):line.rfind('should have') - 1] function_counts[function_name] = function_counts.setdefault(function_name, 0) + 1 - function_details_list = list() + function_details_list = [] for function_name, count in sorted(function_counts.iteritems(), key=lambda (k, v): (v, k), reverse=True): if len(function_details_list) >= functions_shown_max: break @@ -539,7 +539,7 @@ def check_library_report(result_path, message_id): def check_library_function_name(result_path, function_name): print('check_library_function_name') function_name = urllib.unquote_plus(function_name) - output_lines_list = list() + output_lines_list = [] for filename in glob.glob(result_path + '/*'): if not os.path.isfile(filename): continue diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index f9a3681db..4152cbfeb 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -37,7 +37,7 @@ import platform # Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ # Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic # changes) -CLIENT_VERSION = "1.1.2" +CLIENT_VERSION = "1.1.3" def checkRequirements(): @@ -266,8 +266,8 @@ def scanPackage(workPath, cppcheckPath, jobs, fast): print('Crash!') return -1, '', '', -1, options elapsedTime = stopTime - startTime - information_messages_list = list() - issue_messages_list = list() + information_messages_list = [] + issue_messages_list = [] count = 0 for line in stderr.split('\n'): if ': information: ' in line: