From ebd41533d197962a8951d0430e3a0db3260914ed Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 7 Jul 2024 13:22:20 -0300 Subject: [PATCH] Improved the formatting of the grand total output in the blame script. --- scripts/blame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/blame.py b/scripts/blame.py index c3bff7155..6a415aaaa 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -64,12 +64,12 @@ def main(): grand_total[author] += count dump(all_file_counts) - + print("\nGrand Total:") total_lines = sum(grand_total.values()) for author, count in sorted(grand_total.items(), key=itemgetter(1), reverse=True): percentage = (count / total_lines) * 100 - print(f"{author}: {count} lines ({percentage:.2f}%)") + print(f"- {author}: {count} lines ({percentage:.2f}%)") def get_counts_for_file(tag, authors, fname): text = run(['git', 'blame', f'{tag}..HEAD', '--', fname])