Skip to content

Commit

Permalink
Update notebook.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danking committed Jan 22, 2020
1 parent 3d2d3c0 commit 630d8ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tqdm/notebook.py
Expand Up @@ -192,8 +192,10 @@ def __init__(self, *args, **kwargs):
kwargs['gui'] = True
kwargs.setdefault('bar_format', '{l_bar}{bar}{r_bar}')
kwargs['bar_format'] = kwargs['bar_format'].replace('{bar}', '<bar/>')
display = kwargs.get('display')
kwargs['display'] = display if display is not None else False
super(tqdm_notebook, self).__init__(*args, **kwargs)
if self.disable is not False or not kwargs['gui']:
if self.disable or not kwargs['gui']:
return

# Get bar width
Expand All @@ -207,7 +209,7 @@ def __init__(self, *args, **kwargs):
self.sp = self.display

# Print initial bar state
if self.disable is not False:
if self.disable:
self.display()

def __iter__(self, *args, **kwargs):
Expand Down

0 comments on commit 630d8ff

Please sign in to comment.