Skip to content

Commit b8ffdb7

Browse files
committed
Make linters happy
1 parent 127d325 commit b8ffdb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/napari_matplotlib/histogram.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@ def _update_contrast_lims(self) -> None:
125125

126126
def autoset_widget_bins(self, data: npt.NDArray[Any]) -> None:
127127
"""Update widgets with bins determined from the image data"""
128-
129128
if data.dtype.kind in {"i", "u"}:
130129
# Make sure integer data types have integer sized bins
131130
# We can't use unsigned ints when calculating the step, otherwise
132131
# the following warning is raised:
133132
# 'RuntimeWarning: overflow encountered in scalar subtract'
134-
step = abs(np.min(data).astype(int) - np.max(data).astype(int) // 100)
133+
step = abs(
134+
np.min(data).astype(int) - np.max(data).astype(int) // 100
135+
)
135136
step = max(1, step)
136137
bins = np.arange(np.min(data), np.max(data) + step, step)
137138
else:
@@ -141,7 +142,6 @@ def autoset_widget_bins(self, data: npt.NDArray[Any]) -> None:
141142
self.bins_stop = bins[-1]
142143
self.bins_num = bins.size
143144

144-
145145
@property
146146
def bins_start(self) -> float:
147147
"""Minimum bin edge"""

0 commit comments

Comments
 (0)