Skip to content

Commit 63dfdaf

Browse files
committed
Fix feedback from charles
1 parent 1ecf5d3 commit 63dfdaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/huggingface_hub/file_download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def http_get(
488488
)
489489

490490
# Stream file to buffer
491-
progress: tqdm = (
491+
progress_cm: tqdm = (
492492
tqdm( # type: ignore[assignment]
493493
unit="B",
494494
unit_scale=True,
@@ -507,7 +507,7 @@ def http_get(
507507
# case, the progress bar is not closed when exiting the context manager.
508508
)
509509

510-
with progress:
510+
with progress_cm as progress:
511511
if hf_transfer and total is not None and total > 5 * DOWNLOAD_CHUNK_SIZE:
512512
supports_callback = "callback" in inspect.signature(hf_transfer.download).parameters
513513
if not supports_callback:

0 commit comments

Comments
 (0)