Skip to content

Commit 90839bb

Browse files
committed
fix: define total_packages before use in parallel processing log
UnboundLocalError occurred because total_packages was used in print statement before being defined. Moved variable definition to before its first use and removed duplicate definition.
1 parent f63a456 commit 90839bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/omnipkg/package_meta_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,7 @@ def run(
16221622

16231623
updated_count = 0
16241624
max_workers = (os.cpu_count() or 4) * 2
1625+
total_packages = len(distributions_to_process)
16251626
safe_print(f" 🔄 Processing {total_packages} packages in parallel...", flush=True)
16261627

16271628
with concurrent.futures.ThreadPoolExecutor(
@@ -1650,7 +1651,6 @@ def run(
16501651

16511652
end_time = time.perf_counter()
16521653
total_time = end_time - start_time
1653-
total_packages = len(distributions_to_process)
16541654
pkgs_per_sec = total_packages / total_time if total_time > 0 else float("inf")
16551655

16561656
safe_print("\n" + "─" * 60)

0 commit comments

Comments
 (0)