Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #371

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand All @@ -16,10 +16,10 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.285
rev: v0.2.0
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.1.1
hooks:
- id: black
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
Loading