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

Lines changed: 3 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy