We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ecf5d3 commit 63dfdafCopy full SHA for 63dfdaf
src/huggingface_hub/file_download.py
@@ -488,7 +488,7 @@ def http_get(
488
)
489
490
# Stream file to buffer
491
- progress: tqdm = (
+ progress_cm: tqdm = (
492
tqdm( # type: ignore[assignment]
493
unit="B",
494
unit_scale=True,
@@ -507,7 +507,7 @@ def http_get(
507
# case, the progress bar is not closed when exiting the context manager.
508
509
510
- with progress:
+ with progress_cm as progress:
511
if hf_transfer and total is not None and total > 5 * DOWNLOAD_CHUNK_SIZE:
512
supports_callback = "callback" in inspect.signature(hf_transfer.download).parameters
513
if not supports_callback:
0 commit comments