From 59474a3c81af98205e4ba6406aee4c486a6db703 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 17:29:40 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-mypy: v1.14.1 → v1.15.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.1...v1.15.0) - [github.com/pycqa/flake8: 7.1.1 → 7.2.0](https://github.com/pycqa/flake8/compare/7.1.1...7.2.0) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.1) - [github.com/pycqa/isort: 5.13.2 → 6.0.1](https://github.com/pycqa/isort/compare/5.13.2...6.0.1) - [github.com/adrienverge/yamllint: v1.35.1 → v1.37.0](https://github.com/adrienverge/yamllint/compare/v1.35.1...v1.37.0) - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.32.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.30.0...0.32.1) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0dc717a56e9e..61aeda851678 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: - id: trailing-whitespace exclude_types: [svg] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.1 + rev: v1.15.0 hooks: - id: mypy additional_dependencies: @@ -42,7 +42,7 @@ repos: files: lib/matplotlib # Only run when files in lib/matplotlib are changed. pass_filenames: false - repo: https://github.com/pycqa/flake8 - rev: 7.1.1 + rev: 7.2.0 hooks: - id: flake8 additional_dependencies: @@ -51,7 +51,7 @@ repos: - flake8-force args: ["--docstring-convention=all"] - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell files: ^.*\.(py|c|cpp|h|m|md|rst|yml)$ @@ -61,7 +61,7 @@ repos: - "--skip" - "doc/project/credits.rst" - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort name: isort (python) @@ -74,12 +74,12 @@ repos: - sphinx>=1.8.1 - tomli - repo: https://github.com/adrienverge/yamllint - rev: v1.35.1 + rev: v1.37.0 hooks: - id: yamllint args: ["--strict", "--config-file=.yamllint.yml"] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.30.0 + rev: 0.32.1 hooks: # TODO: Re-enable this when https://github.com/microsoft/azure-pipelines-vscode/issues/567 is fixed. # - id: check-azure-pipelines From 83b0d8223ba092864745fe444b412e55df712d95 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 9 Apr 2025 22:23:37 +0200 Subject: [PATCH 2/3] Remove unused nonlocals --- lib/matplotlib/_mathtext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/_mathtext.py b/lib/matplotlib/_mathtext.py index 6a1d9add9e8a..f728cf389127 100644 --- a/lib/matplotlib/_mathtext.py +++ b/lib/matplotlib/_mathtext.py @@ -1610,7 +1610,7 @@ def clamp(value: float) -> float: return -1e9 if value < -1e9 else +1e9 if value > +1e9 else value def hlist_out(box: Hlist) -> None: - nonlocal cur_v, cur_h, off_h, off_v + nonlocal cur_v, cur_h cur_g = 0 cur_glue = 0. @@ -1673,7 +1673,7 @@ def hlist_out(box: Hlist) -> None: cur_h += rule_width def vlist_out(box: Vlist) -> None: - nonlocal cur_v, cur_h, off_h, off_v + nonlocal cur_v, cur_h cur_g = 0 cur_glue = 0. From 34f058973c52af5143fc768a5469032728013f77 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 9 Apr 2025 22:23:46 +0200 Subject: [PATCH 3/3] Rename variable --- lib/matplotlib/figure.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index e1d26a9b58d8..9ceccf93c36f 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -2122,9 +2122,9 @@ def _do_layout(gs, mosaic, unique_ids, nested): # go through the unique keys, for name in unique_ids: # sort out where each axes starts/ends - indx = np.argwhere(mosaic == name) - start_row, start_col = np.min(indx, axis=0) - end_row, end_col = np.max(indx, axis=0) + 1 + idx = np.argwhere(mosaic == name) + start_row, start_col = np.min(idx, axis=0) + end_row, end_col = np.max(idx, axis=0) + 1 # and construct the slice object slc = (slice(start_row, end_row), slice(start_col, end_col)) # some light error checking pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy