Skip to content

Commit

Permalink
TqdmCallback: fix typo/off-by-one error (#277)
Browse files Browse the repository at this point in the history
`self.tqdm` should be set if progress_bar is passed.
  • Loading branch information
skshetry authored Feb 5, 2024
1 parent 542f604 commit a7b0eed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dvc_objects/fs/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ def __init__(
from dvc_objects._tqdm import Tqdm

tqdm_kwargs.pop("total", None)
tqdm_cls = tqdm_cls or Tqdm
super().__init__(
tqdm_kwargs=tqdm_kwargs, tqdm_cls=tqdm_cls, size=size, value=value
tqdm_kwargs=tqdm_kwargs, tqdm_cls=tqdm_cls or Tqdm, size=size, value=value
)
if progress_bar is None:
if progress_bar is not None:
self.tqdm = progress_bar

def branched(self, path_1: "Union[str, BinaryIO]", path_2: str, **kwargs):
Expand Down

0 comments on commit a7b0eed

Please sign in to comment.