|
1 | | -from typing import List, Optional, Tuple |
| 1 | +from typing import Any, List, Optional, Tuple |
2 | 2 |
|
3 | 3 | import matplotlib.colors as mcolor |
4 | 4 | import napari |
5 | | -import numpy as np |
| 5 | +import numpy.typing as npt |
6 | 6 | from magicgui import magicgui |
7 | 7 | from magicgui.widgets import ComboBox |
8 | 8 |
|
@@ -65,7 +65,7 @@ def draw(self) -> None: |
65 | 65 | self.axes.set_xlabel(x_axis_name) |
66 | 66 | self.axes.set_ylabel(y_axis_name) |
67 | 67 |
|
68 | | - def _get_data(self) -> Tuple[List[np.ndarray], str, str]: |
| 68 | + def _get_data(self) -> Tuple[List[npt.NDArray[Any]], str, str]: |
69 | 69 | """Get the plot data. |
70 | 70 |
|
71 | 71 | This must be implemented on the subclass. |
@@ -93,7 +93,7 @@ class ScatterWidget(ScatterBaseWidget): |
93 | 93 | n_layers_input = Interval(2, 2) |
94 | 94 | input_layer_types = (napari.layers.Image,) |
95 | 95 |
|
96 | | - def _get_data(self) -> Tuple[List[np.ndarray], str, str]: |
| 96 | + def _get_data(self) -> Tuple[List[npt.NDArray[Any]], str, str]: |
97 | 97 | """ |
98 | 98 | Get the plot data. |
99 | 99 |
|
@@ -191,7 +191,7 @@ def _get_valid_axis_keys( |
191 | 191 | else: |
192 | 192 | return self.layers[0].features.keys() |
193 | 193 |
|
194 | | - def _get_data(self) -> Tuple[List[np.ndarray], str, str]: |
| 194 | + def _get_data(self) -> Tuple[List[npt.NDArray[Any]], str, str]: |
195 | 195 | """ |
196 | 196 | Get the plot data. |
197 | 197 |
|
|
0 commit comments