Skip to content

Commit 120f087

Browse files
committed
fix: tqdm reading futures
1 parent 2ea4d26 commit 120f087

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

dvc/remote/base.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,14 +573,16 @@ def _download_dir(
573573
file_mode=file_mode,
574574
dir_mode=dir_mode,
575575
)
576+
futures = executor.map(
577+
download_files, file_from_info, file_to_infos
578+
)
576579
with Tqdm(
577-
file_from_info,
580+
futures,
578581
total=len(file_from_info),
579582
desc="Downloading directory",
580-
) as file_from_info:
581-
return sum(
582-
executor.map(download_files, file_from_info, file_to_infos)
583-
)
583+
unit="Files",
584+
) as futures:
585+
return sum(futures)
584586

585587
def _download_file(
586588
self, from_info, to_info, name, no_progress_bar, file_mode, dir_mode

0 commit comments

Comments
 (0)