From 89749f3f7b24be038fafe2e224d70274a741dabd Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Tue, 4 Feb 2025 14:42:30 +0000 Subject: [PATCH 1/4] Update actions to latest versions. --- .github/workflows/docs.yml | 4 ++-- .github/workflows/test_and_deploy.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1a8621..965463c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,9 +17,9 @@ jobs: name: Build & Upload Artifact runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 2a8b731..3709ff5 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -27,10 +27,10 @@ jobs: python-version: ['3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} From 71280f645904d19d16437ab648efe7efe3a27509 Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Tue, 4 Feb 2025 14:45:03 +0000 Subject: [PATCH 2/4] Missed a few. --- .github/workflows/docs.yml | 2 +- .github/workflows/test_and_deploy.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 965463c..fda82b6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -49,7 +49,7 @@ jobs: needs: build-docs if: contains(github.ref, 'tags') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v4.1.7 with: name: docs diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 3709ff5..69e2e2a 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -54,7 +54,7 @@ jobs: run: python -m tox - name: Upload pytest test results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pytest-results-${{ matrix.platform }} py${{ matrix.python-version }} path: reports/ @@ -83,9 +83,9 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install build From 72a4a7f6cbcf420a2441a8d000f3c1a7c2f45fea Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Tue, 4 Feb 2025 14:46:35 +0000 Subject: [PATCH 3/4] Upload docs. --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fda82b6..67dd158 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: working-directory: ./docs - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: docs path: docs/_build From 5f1129e441d004d636a5067d1107e3e42b90241b Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Tue, 4 Mar 2025 16:47:48 +0000 Subject: [PATCH 4/4] Ignore typing for now. --- src/napari_matplotlib/histogram.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/napari_matplotlib/histogram.py b/src/napari_matplotlib/histogram.py index acdd840..f874f0c 100644 --- a/src/napari_matplotlib/histogram.py +++ b/src/napari_matplotlib/histogram.py @@ -28,7 +28,7 @@ def _get_bins( data: npt.NDArray[Any], num_bins: int = 100, -) -> npt.NDArray[Any]: +) -> npt.NDArray[np.floating]: """Create evenly spaced bins with a given interval. Parameters @@ -161,13 +161,13 @@ def draw(self) -> None: for i, c in enumerate("rgb"): self.axes.hist( data[..., i].ravel(), - bins=bins.tolist(), + bins=bins.tolist(), # type: ignore[arg-type] label=c, histtype="step", color=_COLORS[c], ) else: - self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name) + self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name) # type: ignore[arg-type] self._contrast_lines = [ self.axes.axvline(lim, color="white") @@ -297,7 +297,7 @@ def draw(self) -> None: bins = _get_bins(data) - _, bins, patches = self.axes.hist(data, bins=bins.tolist()) + _, bins, patches = self.axes.hist(data, bins=bins.tolist()) # type: ignore[arg-type] patches = cast(BarContainer, patches) # recolor the histogram plot