mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
avoid div by zero
This commit is contained in:
parent
467a9cb587
commit
64dcfefbec
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ def diff_partial_update(lines_orig, lines_updated, final=False, fname=None):
|
|||
if last_non_deleted is None:
|
||||
return ""
|
||||
|
||||
pct = last_non_deleted * 100 / num_orig_lines
|
||||
if num_orig_lines:
|
||||
pct = last_non_deleted * 100 / num_orig_lines
|
||||
else:
|
||||
pct = 50
|
||||
bar = create_progress_bar(pct)
|
||||
bar = f"! {last_non_deleted:3d} / {num_orig_lines:3d} lines [{bar}] {pct:3.0f}%\n\n"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue