fix jupyterlab display

- fixes #1310
- fixes #1359
- fixes #1360
This commit is contained in:
Casper da Costa-Luis 2022-08-30 18:13:37 +01:00
parent 4f208e7255
commit 05e3d32a5f
No known key found for this signature in database
GPG Key ID: F5126E5FBD2512AD
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ WARN_NOIPYW = ("IProgress not found. Please update jupyter and ipywidgets."
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 {}
@ -91,7 +91,7 @@ class TqdmHBox(HBox):
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))