Skip to content
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ repos:
args: [--mapping, '4', --sequence, '4', --offset, '0']

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.15.0
rev: v2.16.0
hooks:
- id: pretty-format-toml
args: [--autofix, --indent, '4']

- repo: https://github.com/asottile/pyupgrade
rev: v3.21.1
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/seddonym/import-linter
rev: v2.6
rev: v2.10
hooks:
- id: import-linter

- repo: https://github.com/pycqa/isort
rev: 7.0.0
rev: 8.0.0
hooks:
- id: isort
args: [--settings-path, pyproject.toml]
Expand All @@ -51,13 +51,13 @@ repos:
- black==24.2.0

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.11.0
rev: 26.1.0
hooks:
- id: black
args: [--config=pyproject.toml]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies: [pydantic, numpy, types-Jinja2]
Expand Down
1 change: 1 addition & 0 deletions bidsmreye/bidsmreye.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Main script."""

from __future__ import annotations

import json
Expand Down
6 changes: 2 additions & 4 deletions bidsmreye/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ def _check_input_dir(self, attribute: str, value: Path) -> None:
)

if not (value / "dataset_description.json").is_file():
raise ValueError(
f"""input_dir does not seem to be a valid BIDS dataset.
raise ValueError(f"""input_dir does not seem to be a valid BIDS dataset.
No dataset_description.json found:
\t{value.absolute()}."""
)
\t{value.absolute()}.""")

output_dir: Path = field(default=None, converter=Path)

Expand Down
4 changes: 2 additions & 2 deletions bidsmreye/generalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def process_subject(cfg: Config, layout_out: BIDSLayout, subject_label: str) ->

opts = model_opts.get_opts()

(_, model_inference) = train.train_model(
_, model_inference = train.train_model(
dataset="example_data",
generators=generators,
opts=opts,
Expand All @@ -241,7 +241,7 @@ def process_subject(cfg: Config, layout_out: BIDSLayout, subject_label: str) ->
elif log.isEnabledFor(logging.INFO):
verbose = 1

(_, _) = train.evaluate_model(
_, _ = train.evaluate_model(
dataset="tmp",
model=model_inference,
generators=generators,
Expand Down
6 changes: 2 additions & 4 deletions bidsmreye/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ def collect_group_qc_data(cfg: Config) -> pd.DataFrame | None:
try:
qc_data = qc_data[cols]
except KeyError:
log.error(
f"""Sidecar files seem to be missing the keys: {cols}.
To fix try to run the qc at the participant level first."""
)
log.error(f"""Sidecar files seem to be missing the keys: {cols}.
To fix try to run the qc at the participant level first.""")
return None

return qc_data
Expand Down
Loading