Skip to content

Commit a40faf2

Browse files
committed
codestyle
1 parent 47ccb37 commit a40faf2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/napari_matplotlib/histogram.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Optional, List, Tuple
1+
from typing import Optional, List, Tuple, Any
2+
import numpy.typing as npt
23

34
import napari
45
import numpy as np
@@ -60,6 +61,9 @@ def draw(self) -> None:
6061

6162

6263
class FeaturesHistogramWidget(SingleAxesWidget):
64+
"""
65+
Display a histogram of selected feature attached to selected layer.
66+
"""
6367
n_layers_input = Interval(1, 1)
6468
# All layers that have a .features attributes
6569
input_layer_types = FEATURES_LAYER_TYPES
@@ -109,7 +113,7 @@ def _get_valid_axis_keys(self) -> List[str]:
109113
else:
110114
return self.layers[0].features.keys()
111115

112-
def _get_data(self) -> Tuple[np.ndarray, str]:
116+
def _get_data(self) -> Tuple[npt.NDArray[Any], str]:
113117
"""Get the plot data.
114118
115119
Returns
@@ -163,4 +167,4 @@ def draw(self) -> None:
163167

164168
# set ax labels
165169
self.axes.set_xlabel(x_axis_name)
166-
self.axes.set_ylabel('Counts [#]')
170+
self.axes.set_ylabel('Counts [#]')

0 commit comments

Comments
 (0)