Skip to content

Commit d49a4d5

Browse files
[pre-commit.ci] pre-commit autoupdate (#371)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.285 → v0.2.0](astral-sh/ruff-pre-commit@v0.0.285...v0.2.0) - [github.com/psf/black: 23.7.0 → 24.1.1](psf/black@23.7.0...24.1.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 25b39a8 commit d49a4d5

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.4.0
7+
rev: v4.5.0
88
hooks:
99
- id: check-docstring-first
1010
- id: check-executables-have-shebangs
@@ -16,10 +16,10 @@ repos:
1616
- id: requirements-txt-fixer
1717
- id: trailing-whitespace
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.0.285
19+
rev: v0.2.0
2020
hooks:
2121
- id: ruff
2222
- repo: https://github.com/psf/black
23-
rev: 23.7.0
23+
rev: 24.1.1
2424
hooks:
2525
- id: black

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
@@ -253,9 +253,9 @@ def set_training_data_non_cell(self):
253253
self.training_data_non_cell_layer = self.viewer.layers[
254254
self.training_data_non_cell_choice.currentText()
255255
]
256-
self.training_data_non_cell_layer.metadata[
257-
"point_type"
258-
] = Cell.UNKNOWN
256+
self.training_data_non_cell_layer.metadata["point_type"] = (
257+
Cell.UNKNOWN
258+
)
259259
self.training_data_non_cell_layer.metadata["training_data"] = True
260260

261261
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)