Skip to content

Commit 2907471

Browse files
committed
remove global
1 parent 3b67cc4 commit 2907471

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

datasets/loader_utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
import numpy as np
2121
import tqdm
2222

23-
pbar: tqdm.tqdm = None
24-
2523

2624
def _show_progress(block_num: int, block_size: int, total_size: int) -> None:
27-
global pbar
28-
if pbar is None:
29-
pbar = tqdm.tqdm(total=total_size / 1024, unit='kB')
25+
pbar: tqdm.tqdm = tqdm.tqdm(total=total_size / 1024, unit='kB')
3026

3127
downloaded = block_num * block_size
3228
if downloaded < total_size:

0 commit comments

Comments
 (0)