From 05e3d32a5fc8559e133e6d627d44afda93018637 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 30 Aug 2022 18:13:37 +0100 Subject: [PATCH] fix jupyterlab display - fixes #1310 - fixes #1359 - fixes #1360 --- tqdm/notebook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tqdm/notebook.py b/tqdm/notebook.py index 5a264d36..3565815a 100644 --- a/tqdm/notebook.py +++ b/tqdm/notebook.py @@ -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))