From 7546b1168276848a08c2f41a78b5d803231d26b6 Mon Sep 17 00:00:00 2001 From: Lukas Rothenberger Date: Wed, 23 Oct 2024 10:13:46 +0200 Subject: [PATCH] fix: formatting --- .pre-commit-config.yaml | 2 +- .../utilities/statistics/output_statistics.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65ad11f08..4002d6877 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: # black -- more info: https://github.com/psf/black/blob/main/docs/integrations/source_version_control.md - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 24.4.2 hooks: - id: black args: [--line-length=120] diff --git a/discopop_explorer/utilities/statistics/output_statistics.py b/discopop_explorer/utilities/statistics/output_statistics.py index a0e7c4f49..92053c556 100644 --- a/discopop_explorer/utilities/statistics/output_statistics.py +++ b/discopop_explorer/utilities/statistics/output_statistics.py @@ -85,23 +85,23 @@ def output_suggestion_statistics( for suggestion_id in suggestion_summed_cyclomatic_complexity_from_calls: if suggestion_id not in statistics_dict_by_suggestionID: statistics_dict_by_suggestionID[suggestion_id] = dict() - statistics_dict_by_suggestionID[suggestion_id][ - "suggestion_summed_cyclomatic_complexity_from_calls" - ] = suggestion_summed_cyclomatic_complexity_from_calls[suggestion_id] + statistics_dict_by_suggestionID[suggestion_id]["suggestion_summed_cyclomatic_complexity_from_calls"] = ( + suggestion_summed_cyclomatic_complexity_from_calls[suggestion_id] + ) for suggestion_id in suggestion_immediate_lines_of_code: if suggestion_id not in statistics_dict_by_suggestionID: statistics_dict_by_suggestionID[suggestion_id] = dict() - statistics_dict_by_suggestionID[suggestion_id][ - "suggestion_immediate_lines_of_code" - ] = suggestion_immediate_lines_of_code[suggestion_id] + statistics_dict_by_suggestionID[suggestion_id]["suggestion_immediate_lines_of_code"] = ( + suggestion_immediate_lines_of_code[suggestion_id] + ) for suggestion_id in suggestion_lines_of_code_including_calls: if suggestion_id not in statistics_dict_by_suggestionID: statistics_dict_by_suggestionID[suggestion_id] = dict() - statistics_dict_by_suggestionID[suggestion_id][ - "suggestion_lines_of_code_including_calls" - ] = suggestion_lines_of_code_including_calls[suggestion_id] + statistics_dict_by_suggestionID[suggestion_id]["suggestion_lines_of_code_including_calls"] = ( + suggestion_lines_of_code_including_calls[suggestion_id] + ) with open(statistics_file_by_suggestionID, "w+") as f: f.write(json.dumps(statistics_dict_by_suggestionID) + "\n")