Skip to content

Commit

Permalink
fix jupyterlab display
Browse files Browse the repository at this point in the history
- fixes tqdm#1310
- fixes tqdm#1359
- fixes tqdm#1360
  • Loading branch information
casperdcl committed Aug 30, 2022
1 parent 4f208e7 commit 05e3d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tqdm/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

class TqdmHBox(HBox):
"""`ipywidgets.HBox` with a pretty representation"""
def _repr_json_(self, pretty=None):
def _json_(self, pretty=None):
pbar = getattr(self, 'pbar', None)
if pbar is None:
return {}
Expand All @@ -91,7 +91,7 @@ def __repr__(self, pretty=False):
pbar = getattr(self, 'pbar', None)
if pbar is None:
return super(TqdmHBox, self).__repr__()
return pbar.format_meter(**self._repr_json_(pretty))
return pbar.format_meter(**self._json_(pretty))

def _repr_pretty_(self, pp, *_, **__):
pp.text(self.__repr__(True))
Expand Down

0 comments on commit 05e3d32

Please sign in to comment.