From c6a92fad9ab9c1b1fd0b0b2726561f434274bd9d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 17:15:57 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.4...v0.11.6) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a172dab..bd929a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.11.4' + rev: 'v0.11.6' hooks: - id: ruff From d4cd7d30831a58fea0b0ace9b38d9254f64c2bbc Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Tue, 22 Apr 2025 10:38:08 +0100 Subject: [PATCH 2/2] Remove type:ignore flags for bins in histogram.py. --- src/napari_matplotlib/histogram.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/napari_matplotlib/histogram.py b/src/napari_matplotlib/histogram.py index f874f0c..85bba9d 100644 --- a/src/napari_matplotlib/histogram.py +++ b/src/napari_matplotlib/histogram.py @@ -161,13 +161,13 @@ def draw(self) -> None: for i, c in enumerate("rgb"): self.axes.hist( data[..., i].ravel(), - bins=bins.tolist(), # type: ignore[arg-type] + bins=bins.tolist(), label=c, histtype="step", color=_COLORS[c], ) else: - self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name) # type: ignore[arg-type] + self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name) 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()) # type: ignore[arg-type] + _, bins, patches = self.axes.hist(data, bins=bins.tolist()) patches = cast(BarContainer, patches) # recolor the histogram plot