Skip to content

Commit e41d0d9

Browse files
committed
Address AI PR comment about multi-line string calculation
1 parent 7c2940b commit e41d0d9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

update_s3_objects.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,16 @@ def reconcile_s3(
264264
removed_count += results["removed"]
265265
error_count += results["errors"]
266266

267+
completed = created_count + removed_count + error_count
268+
if total_actions > 0:
269+
progress_pct = completed / total_actions * 100
270+
else:
271+
progress_pct = 0
272+
267273
logger.info(
268274
f"Completed chunk {chunk_index + 1}/{len(action_chunks)}, "
269-
f"total progress: {created_count + removed_count + error_count}/"
270-
f"{total_actions} ({(
271-
created_count + removed_count + error_count
272-
) / total_actions * 100:.1f}%)"
275+
f"total progress: {completed}/{total_actions} "
276+
f"({progress_pct:.1f}%)"
273277
)
274278

275279
except Exception as e:

0 commit comments

Comments
 (0)