Skip to content

[pre-commit.ci] pre-commit autoupdate #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove type:ignore flags for bins in histogram.py.
  • Loading branch information
samcunliffe committed Apr 22, 2025
commit d4cd7d30831a58fea0b0ace9b38d9254f64c2bbc
6 changes: 3 additions & 3 deletions src/napari_matplotlib/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down