mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
Improved the formatting of the grand total output in the blame script.
This commit is contained in:
parent
a619318dfe
commit
ebd41533d1
1 changed files with 2 additions and 2 deletions
|
@ -64,12 +64,12 @@ def main():
|
||||||
grand_total[author] += count
|
grand_total[author] += count
|
||||||
|
|
||||||
dump(all_file_counts)
|
dump(all_file_counts)
|
||||||
|
|
||||||
print("\nGrand Total:")
|
print("\nGrand Total:")
|
||||||
total_lines = sum(grand_total.values())
|
total_lines = sum(grand_total.values())
|
||||||
for author, count in sorted(grand_total.items(), key=itemgetter(1), reverse=True):
|
for author, count in sorted(grand_total.items(), key=itemgetter(1), reverse=True):
|
||||||
percentage = (count / total_lines) * 100
|
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):
|
def get_counts_for_file(tag, authors, fname):
|
||||||
text = run(['git', 'blame', f'{tag}..HEAD', '--', fname])
|
text = run(['git', 'blame', f'{tag}..HEAD', '--', fname])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue