Skip to content

Commit acfb10e

Browse files
committed
Fix type checking
1 parent 6d37c78 commit acfb10e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/napari_matplotlib/histogram.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from typing import Any, Optional
1+
from typing import Any, Optional, cast
22

33
import napari
44
import numpy as np
55
import numpy.typing as npt
6+
from matplotlib.container import BarContainer
67
from qtpy.QtWidgets import QComboBox, QLabel, QVBoxLayout, QWidget
78

89
from .base import SingleAxesWidget
@@ -185,6 +186,7 @@ def draw(self) -> None:
185186
_, bins, patches = self.axes.hist(
186187
data, bins=50, edgecolor="white", linewidth=0.3
187188
)
189+
patches = cast(BarContainer, patches)
188190

189191
# recolor the histogram plot
190192
if colormap is not None:

0 commit comments

Comments
 (0)