Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent deace84 commit 53f7fc9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
8 changes: 2 additions & 6 deletions cellfinder/core/classify/cube_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ def __len__(self) -> int:
"""
return len(self.batches)

def __getitem__(
self, index: int
) -> Union[
def __getitem__(self, index: int) -> Union[
np.ndarray,
Tuple[np.ndarray, List[Dict[str, float]]],
Tuple[np.ndarray, Dict],
Expand Down Expand Up @@ -389,9 +387,7 @@ def __len__(self) -> int:
"""
return int(np.ceil(len(self.signal_list) / self.batch_size))

def __getitem__(
self, index: int
) -> Union[
def __getitem__(self, index: int) -> Union[
np.ndarray,
Tuple[np.ndarray, List[Dict[str, float]]],
Tuple[np.ndarray, Dict],
Expand Down
6 changes: 3 additions & 3 deletions cellfinder/core/detect/filters/volume/ball_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,6 @@ def _walk(
THRESHOLD_VALUE,
kernel,
):
volume[
ball_centre_x, ball_centre_y, middle_z
] = SOMA_CENTRE_VALUE
volume[ball_centre_x, ball_centre_y, middle_z] = (
SOMA_CENTRE_VALUE
)
1 change: 1 addition & 0 deletions cellfinder/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
N.B imports are within functions to prevent tensorflow being imported before
it's warnings are silenced
"""

import os
from typing import Callable, List, Optional, Tuple

Expand Down
1 change: 1 addition & 0 deletions cellfinder/core/tools/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
==================
Functions to prepare files and directories needed for other functions
"""

import os
from pathlib import Path
from typing import Optional
Expand Down
6 changes: 3 additions & 3 deletions cellfinder/napari/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ def set_training_data_non_cell(self):
self.training_data_non_cell_layer = self.viewer.layers[
self.training_data_non_cell_choice.currentText()
]
self.training_data_non_cell_layer.metadata[
"point_type"
] = Cell.UNKNOWN
self.training_data_non_cell_layer.metadata["point_type"] = (
Cell.UNKNOWN
)
self.training_data_non_cell_layer.metadata["training_data"] = True

def add_training_data(self):
Expand Down
1 change: 1 addition & 0 deletions examples/show_detection_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- loads the cellfinder-napari cell detection plugin
- opens the napari viewer
"""

import napari

from cellfinder.napari.sample_data import load_sample
Expand Down

0 comments on commit 53f7fc9

Please sign in to comment.