From 579451ca64b7f66b59373aab3af586dae83ba753 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 18:43:42 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.15.0 → v2.16.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.15.0...v2.16.0) - [github.com/asottile/pyupgrade: v3.21.1 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.21.1...v3.21.2) - [github.com/seddonym/import-linter: v2.6 → v2.10](https://github.com/seddonym/import-linter/compare/v2.6...v2.10) - [github.com/pycqa/isort: 7.0.0 → 8.0.0](https://github.com/pycqa/isort/compare/7.0.0...8.0.0) - [github.com/psf/black-pre-commit-mirror: 25.11.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.11.0...26.1.0) - [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.18.2...v1.19.1) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa1d912..568663a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] @@ -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] From 5bfb84e6d89a95a4d05cac6f68d0015be97af5f3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 18:44:52 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- bidsmreye/bidsmreye.py | 1 + bidsmreye/configuration.py | 6 ++---- bidsmreye/generalize.py | 4 ++-- bidsmreye/visualize.py | 6 ++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bidsmreye/bidsmreye.py b/bidsmreye/bidsmreye.py index e013ccd..0690d57 100755 --- a/bidsmreye/bidsmreye.py +++ b/bidsmreye/bidsmreye.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """Main script.""" + from __future__ import annotations import json diff --git a/bidsmreye/configuration.py b/bidsmreye/configuration.py index 9dee2a4..3f44ce7 100644 --- a/bidsmreye/configuration.py +++ b/bidsmreye/configuration.py @@ -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) diff --git a/bidsmreye/generalize.py b/bidsmreye/generalize.py index 12bb625..0eae7e2 100644 --- a/bidsmreye/generalize.py +++ b/bidsmreye/generalize.py @@ -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, @@ -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, diff --git a/bidsmreye/visualize.py b/bidsmreye/visualize.py index 6736d3e..23797ca 100644 --- a/bidsmreye/visualize.py +++ b/bidsmreye/visualize.py @@ -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