Skip to content

Commit 53f7fc9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent deace84 commit 53f7fc9

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

cellfinder/core/classify/cube_generator.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ def __len__(self) -> int:
197197
"""
198198
return len(self.batches)
199199

200-
def __getitem__(
201-
self, index: int
202-
) -> Union[
200+
def __getitem__(self, index: int) -> Union[
203201
np.ndarray,
204202
Tuple[np.ndarray, List[Dict[str, float]]],
205203
Tuple[np.ndarray, Dict],
@@ -389,9 +387,7 @@ def __len__(self) -> int:
389387
"""
390388
return int(np.ceil(len(self.signal_list) / self.batch_size))
391389

392-
def __getitem__(
393-
self, index: int
394-
) -> Union[
390+
def __getitem__(self, index: int) -> Union[
395391
np.ndarray,
396392
Tuple[np.ndarray, List[Dict[str, float]]],
397393
Tuple[np.ndarray, Dict],

cellfinder/core/detect/filters/volume/ball_filter.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,6 @@ def _walk(
327327
THRESHOLD_VALUE,
328328
kernel,
329329
):
330-
volume[
331-
ball_centre_x, ball_centre_y, middle_z
332-
] = SOMA_CENTRE_VALUE
330+
volume[ball_centre_x, ball_centre_y, middle_z] = (
331+
SOMA_CENTRE_VALUE
332+
)

cellfinder/core/main.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
N.B imports are within functions to prevent tensorflow being imported before
33
it's warnings are silenced
44
"""
5+
56
import os
67
from typing import Callable, List, Optional, Tuple
78

cellfinder/core/tools/prep.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
==================
44
Functions to prepare files and directories needed for other functions
55
"""
6+
67
import os
78
from pathlib import Path
89
from typing import Optional

cellfinder/napari/curation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ def set_training_data_non_cell(self):
246246
self.training_data_non_cell_layer = self.viewer.layers[
247247
self.training_data_non_cell_choice.currentText()
248248
]
249-
self.training_data_non_cell_layer.metadata[
250-
"point_type"
251-
] = Cell.UNKNOWN
249+
self.training_data_non_cell_layer.metadata["point_type"] = (
250+
Cell.UNKNOWN
251+
)
252252
self.training_data_non_cell_layer.metadata["training_data"] = True
253253

254254
def add_training_data(self):

examples/show_detection_sample.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- loads the cellfinder-napari cell detection plugin
88
- opens the napari viewer
99
"""
10+
1011
import napari
1112

1213
from cellfinder.napari.sample_data import load_sample

0 commit comments

Comments
 (0)