From fb0844f4dd576da65351e5381424d7790cff34e6 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 23 Mar 2022 23:25:54 +0000 Subject: [PATCH 1/5] build: fix dev deps URL --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index cb009ac8f..d4580dc39 100644 --- a/environment.yml +++ b/environment.yml @@ -36,10 +36,10 @@ dependencies: - wheel # `setup.py bdist_wheel` # `cd docs && pymake` - mkdocs-material -- pydoc-markdown >=3.3.0 +- pydoc-markdown >=4.6.0 - pygments - pymdown-extensions - pip: - py-make >=0.1.0 # `setup.py make/pymake` - mkdocs-minify-plugin # `cd docs && pymake` - - git+git://github.com/tqdm/jsmin@python3-only#egg=jsmin # `cd docs && pymake` + - git+https://github.com/tqdm/jsmin@python3-only#egg=jsmin # `cd docs && pymake` From 96fe8c504a0660de8b0baf4be4b57f97d9c8d1ba Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sat, 26 Mar 2022 19:40:34 +0000 Subject: [PATCH 2/5] rich: expose `options` kwargs - replaces/closes #1282 --- tqdm/rich.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tqdm/rich.py b/tqdm/rich.py index cf8e71432..69893ffdd 100644 --- a/tqdm/rich.py +++ b/tqdm/rich.py @@ -84,12 +84,15 @@ def __init__(self, *args, **kwargs): ---------- progress : tuple, optional arguments for `rich.progress.Progress()`. + options : dict, optional + keyword arguments for `rich.progress.Progress()`. """ kwargs = kwargs.copy() kwargs['gui'] = True # convert disable = None to False kwargs['disable'] = bool(kwargs.get('disable', False)) progress = kwargs.pop('progress', None) + options = kwargs.pop('options', {}).copy() super(tqdm_rich, self).__init__(*args, **kwargs) if self.disable: @@ -108,7 +111,8 @@ def __init__(self, *args, **kwargs): ",", RateColumn(unit=d['unit'], unit_scale=d['unit_scale'], unit_divisor=d['unit_divisor']), "]" ) - self._prog = Progress(*progress, transient=not self.leave) + options.setdefault('transient', not self.leave) + self._prog = Progress(*progress, **options) self._prog.__enter__() self._task_id = self._prog.add_task(self.desc or "", **d) From d14adb602b9248e3faa6a2cf29aceb1d084fcbf4 Mon Sep 17 00:00:00 2001 From: Shubhankar Date: Sat, 26 Mar 2022 15:27:37 -0500 Subject: [PATCH 3/5] docs: fix typo (#1301) --- tqdm/std.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tqdm/std.py b/tqdm/std.py index 9a687391b..5f9dccafe 100644 --- a/tqdm/std.py +++ b/tqdm/std.py @@ -672,7 +672,7 @@ def pandas(cls, **tqdm_kwargs): | groupby.(generic.)SeriesGroupBy ).progress_apply - A new instance will be create every time `progress_apply` is called, + A new instance will be created every time `progress_apply` is called, and each instance will automatically `close()` upon completion. Parameters From 08e920741e2604be74fe95e7234a4f602fc08b92 Mon Sep 17 00:00:00 2001 From: Slava Date: Sat, 26 Mar 2022 22:31:11 +0200 Subject: [PATCH 4/5] docs: fix custom callback example typo (#1299) --- .meta/.readme.rst | 2 +- README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.meta/.readme.rst b/.meta/.readme.rst index 01a1bf91f..65ffb1818 100644 --- a/.meta/.readme.rst +++ b/.meta/.readme.rst @@ -757,7 +757,7 @@ custom callback take advantage of this, simply use the return value of class TqdmExt(std_tqdm): def update(self, n=1): - displayed = super(TqdmExt, self).update(n): + displayed = super(TqdmExt, self).update(n) if displayed: external_callback(**self.format_dict) return displayed diff --git a/README.rst b/README.rst index 0763e7c86..349837950 100644 --- a/README.rst +++ b/README.rst @@ -976,7 +976,7 @@ custom callback take advantage of this, simply use the return value of class TqdmExt(std_tqdm): def update(self, n=1): - displayed = super(TqdmExt, self).update(n): + displayed = super(TqdmExt, self).update(n) if displayed: external_callback(**self.format_dict) return displayed From 9f0ffe6e9f77f0b15274684920bbd69adce5d3be Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sun, 3 Apr 2022 22:57:39 +0100 Subject: [PATCH 5/5] autonotebook: re-enable VSCode (#1309) --- tqdm/autonotebook.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tqdm/autonotebook.py b/tqdm/autonotebook.py index 1f2258146..a09f2ec4b 100644 --- a/tqdm/autonotebook.py +++ b/tqdm/autonotebook.py @@ -6,7 +6,6 @@ >>> for i in trange(10): ... ... """ -import os import sys from warnings import warn @@ -14,8 +13,6 @@ get_ipython = sys.modules['IPython'].get_ipython if 'IPKernelApp' not in get_ipython().config: # pragma: no cover raise ImportError("console") - if 'VSCODE_PID' in os.environ: # pragma: no cover - raise ImportError("vscode") from .notebook import WARN_NOIPYW, IProgress if IProgress is None: from .std import TqdmWarning