diff --git a/dvc/progress.py b/dvc/progress.py index 93334c46b..df36726b8 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -67,10 +67,10 @@ class Tqdm(tqdm): kwargs = kwargs.copy() kwargs.setdefault("unit_scale", True) if bytes: - kwargs = merge( - dict(unit="B", unit_scale=True, unit_divisor=1024, miniters=1), - kwargs, + bytes_defaults = dict( + unit="B", unit_scale=True, unit_divisor=1024, miniters=1 ) + kwargs = merge(bytes_defaults, kwargs) self.desc_persist = desc if disable is None: disable = logger.getEffectiveLevel() > level diff --git a/dvc/repo/checkout.py b/dvc/repo/checkout.py index 40f4b123b..de7e77cea 100644 --- a/dvc/repo/checkout.py +++ b/dvc/repo/checkout.py @@ -41,11 +41,7 @@ def checkout(self, target=None, with_deps=False, force=False, recursive=False): if total == 0: logger.info("Nothing to do") with Tqdm( - total=total, - unit="file", - desc="Checkout", - disable=total == 0, - leave=logger.getEffectiveLevel() < logging.CRITICAL, + total=total, unit="file", desc="Checkout", disable=total == 0 ) as pbar: for stage in stages: if stage.locked: