fix notebook with unknown total

fixes #743
This commit is contained in:
Casper da Costa-Luis 2019-05-13 22:23:22 +00:00
parent c901886db9
commit 53ecca3d74
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
1 changed files with 2 additions and 1 deletions

View File

@ -209,8 +209,9 @@ class tqdm_notebook(tqdm):
# Replace with IPython progress bar display (with correct total)
unit_scale = 1 if self.unit_scale is True else self.unit_scale or 1
total = self.total * unit_scale if self.total else self.total
self.sp = self.status_printer(
self.fp, self.total * unit_scale, self.desc, self.ncols)
self.fp, total, self.desc, self.ncols)
self.desc = None # trick to place description before the bar
# Print initial bar state