mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
style: fix string quote consistency in blame.py
This commit is contained in:
parent
13318219db
commit
554d274fff
1 changed files with 6 additions and 6 deletions
|
@ -145,19 +145,19 @@ def main():
|
|||
|
||||
if args.all_since:
|
||||
new_results = process_all_tags_since(args.start_tag)
|
||||
|
||||
|
||||
# If output file exists, read and update it
|
||||
existing_results = []
|
||||
if args.output and os.path.exists(args.output):
|
||||
with open(args.output, 'r') as f:
|
||||
with open(args.output, "r") as f:
|
||||
existing_results = yaml.safe_load(f) or []
|
||||
|
||||
# Create a map of start_tag->end_tag to result for existing entries
|
||||
existing_map = {(r['start_tag'], r['end_tag']): i for i, r in enumerate(existing_results)}
|
||||
existing_map = {(r["start_tag"], r["end_tag"]): i for i, r in enumerate(existing_results)}
|
||||
|
||||
# Update or append new results
|
||||
for new_result in new_results:
|
||||
key = (new_result['start_tag'], new_result['end_tag'])
|
||||
key = (new_result["start_tag"], new_result["end_tag"])
|
||||
if key in existing_map:
|
||||
# Replace existing entry
|
||||
existing_results[existing_map[key]] = new_result
|
||||
|
@ -166,8 +166,8 @@ def main():
|
|||
existing_results.append(new_result)
|
||||
|
||||
# Sort results by start_tag
|
||||
existing_results.sort(key=lambda x: semver.Version.parse(x['start_tag'][1:]))
|
||||
|
||||
existing_results.sort(key=lambda x: semver.Version.parse(x["start_tag"][1:]))
|
||||
|
||||
yaml_output = yaml.dump(existing_results, sort_keys=True)
|
||||
else:
|
||||
all_file_counts, grand_total, total_lines, aider_total, aider_percentage, end_date = blame(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue