mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
TqdmCallback: minor fixup, check for None explicitly
Tqdm supports __bool__, so we should really use `is not None` test rather than boolean check. This is not used anywhere right now, but I'd prefer being correct.
This commit is contained in:
committed by
skshetry
parent
8fb2f65d4b
commit
f10dbef0cf
+3
-1
@@ -108,7 +108,9 @@ class TqdmCallback(FsspecCallback):
|
||||
from dvc.progress import Tqdm
|
||||
|
||||
return self._stack.enter_context(
|
||||
self._progress_bar or Tqdm(**self._tqdm_kwargs)
|
||||
self._progress_bar
|
||||
if self._progress_bar is not None
|
||||
else Tqdm(**self._tqdm_kwargs)
|
||||
)
|
||||
|
||||
def __enter__(self):
|
||||
|
||||
Reference in New Issue
Block a user