diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 07:20:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 07:20:35 +0000 |
commit | afe32357dad42cf16838d7a2076db4e1a4c6a36b (patch) | |
tree | 83fb8864dc91854198b9124e8fe84c4d35d3f417 | |
parent | Releasing debian version 4.67.0-1. (diff) | |
download | tqdm-afe32357dad42cf16838d7a2076db4e1a4c6a36b.tar.xz tqdm-afe32357dad42cf16838d7a2076db4e1a4c6a36b.zip |
Merging upstream version 4.67.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
-rw-r--r-- | environment.yml | 6 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | tqdm/gui.py | 17 |
4 files changed, 10 insertions, 17 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0eff569..01ea543 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - numpy - pandas - pytest-timeout - - pytest-asyncio>0.21 + - pytest-asyncio>=0.24 - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 hooks: diff --git a/environment.yml b/environment.yml index a8347fe..89e0406 100644 --- a/environment.yml +++ b/environment.yml @@ -20,8 +20,7 @@ dependencies: - pytest - pytest-cov - pytest-timeout -- pytest-asyncio -- nbval +- pytest-asyncio>=0.24 - coverage # extras - dask # dask @@ -35,12 +34,13 @@ dependencies: - rich # rich - argopt # `cd wiki && pymake` - twine # `pymake check pypi` -- build # `python -m build` +- python-build # `python -m build` # `cd docs && pymake` - mkdocs-material - pygments - pymdown-extensions - pip: + - git+https://github.com/casperdcl/nbval.git@master#egg=nbval # tests (native) - py-make >=0.1.0 # `make/pymake` - mkdocs-minify-plugin # `cd docs && pymake` - git+https://github.com/tqdm/jsmin@fix-pip#egg=jsmin # `cd docs && pymake` diff --git a/pyproject.toml b/pyproject.toml index 5651e88..c31f86a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ classifiers = [ dependencies = ['colorama; platform_system == "Windows"'] [project.optional-dependencies] -dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-xdist"] +dev = ["pytest>=6", "pytest-cov", "pytest-timeout", "pytest-asyncio>=0.24", "nbval"] discord = ["requests"] slack = ["slack-sdk"] telegram = ["requests"] diff --git a/tqdm/gui.py b/tqdm/gui.py index 1a80681..cb52fb9 100644 --- a/tqdm/gui.py +++ b/tqdm/gui.py @@ -122,6 +122,7 @@ class tqdm_gui(std_tqdm): # pragma: no cover ax = self.ax line1 = self.line1 line2 = self.line2 + hspan = getattr(self, 'hspan', None) # instantaneous rate y = delta_it / delta_t # overall rate @@ -148,18 +149,10 @@ class tqdm_gui(std_tqdm): # pragma: no cover if total: line1.set_data(xdata, ydata) line2.set_data(xdata, zdata) - try: - poly_lims = self.hspan.get_xy() - except AttributeError: - self.hspan = self.plt.axhspan(0, 0.001, xmin=0, xmax=0, color='g') - poly_lims = self.hspan.get_xy() - poly_lims[0, 1] = ymin - poly_lims[1, 1] = ymax - poly_lims[2] = [n / total, ymax] - poly_lims[3] = [poly_lims[2, 0], ymin] - if len(poly_lims) > 4: - poly_lims[4, 1] = ymin - self.hspan.set_xy(poly_lims) + if hspan: + hspan.set_xy((0, ymin)) + hspan.set_height(ymax - ymin) + hspan.set_width(n / total) else: t_ago = [cur_t - i for i in xdata] line1.set_data(t_ago, ydata) |