From c0852644752b934ccb626554a657ab152c0ed9d9 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sun, 13 Apr 2025 12:26:41 +0200 Subject: [PATCH 1/2] Bump (most) pre-commit versions --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55a33c52c7f8..223c928b7e24 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: @@ -44,7 +44,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.11.0 + rev: v0.11.5 hooks: # Run the linter. - id: ruff @@ -60,7 +60,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) @@ -73,12 +73,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.33.0 hooks: # TODO: Re-enable this when https://github.com/microsoft/azure-pipelines-vscode/issues/567 is fixed. # - id: check-azure-pipelines From 0c312495875d5efba9045db8862c4f40533b2db1 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sun, 13 Apr 2025 12:32:11 +0200 Subject: [PATCH 2/2] Bump codespell version --- .pre-commit-config.yaml | 2 +- ci/codespell-ignore-words.txt | 1 + lib/matplotlib/figure.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 223c928b7e24..afcdc44c1b4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,7 @@ repos: - id: ruff args: [--fix, --show-fixes] - 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)$ diff --git a/ci/codespell-ignore-words.txt b/ci/codespell-ignore-words.txt index e28e7ef99fd7..0ebc5211b80c 100644 --- a/ci/codespell-ignore-words.txt +++ b/ci/codespell-ignore-words.txt @@ -1,4 +1,5 @@ aas +ABD axises coo curvelinear diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index e1d26a9b58d8..ec11e379db60 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 + index = np.argwhere(mosaic == name) + start_row, start_col = np.min(index, axis=0) + end_row, end_col = np.max(index, axis=0) + 1 # and construct the slice object slc = (slice(start_row, end_row), slice(start_col, end_col)) # some light error checking