From 9591160d79ee3e7a8447cd5c5af6a8a3f82c0d0f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Dec 2023 16:56:09 -0500 Subject: [PATCH 1/2] Ran pre-commit on everything, black decided to adjust some formatting (no functional changes) --- heudiconv/heuristics/example.py | 5 +++-- heudiconv/parser.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/heudiconv/heuristics/example.py b/heudiconv/heuristics/example.py index 1649ae7f..28ae6c7d 100644 --- a/heudiconv/heuristics/example.py +++ b/heudiconv/heuristics/example.py @@ -72,11 +72,12 @@ def infotodict( } last_run = len(seqinfo) for s in seqinfo: - series_num_str = s.series_id.split('-', 1)[0] + series_num_str = s.series_id.split("-", 1)[0] if not series_num_str.isdecimal(): raise ValueError( f"This heuristic can operate only on data when series_id has form -, " - f"and is a numeric number. Got series_id={s.series_id}") + f"and is a numeric number. Got series_id={s.series_id}" + ) series_num: int = int(series_num_str) sl, nt = (s.dim3, s.dim4) if (sl == 176) and (nt == 1) and ("MPRAGE" in s.protocol_name): diff --git a/heudiconv/parser.py b/heudiconv/parser.py index bb8b73e1..27d822e1 100644 --- a/heudiconv/parser.py +++ b/heudiconv/parser.py @@ -279,8 +279,9 @@ def infotoids( lgr.info("Study session for %r", study_session_info) if grouping != "all": - assert (study_session_info not in study_sessions), ( + assert study_session_info not in study_sessions, ( f"Existing study session {study_session_info} " - f"already in analyzed sessions {study_sessions.keys()}") + f"already in analyzed sessions {study_sessions.keys()}" + ) study_sessions[study_session_info] = seqinfo return study_sessions From 712c91db7beacff1a1edba8040be1d147e0ba605 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Dec 2023 17:16:05 -0500 Subject: [PATCH 2/2] Simplify pattern and start with .* for a warning to ignore for some reason on CI it is not getting ignored --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a120066b..5e62db0c 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,7 @@ filterwarnings = # ignore:.*pkg_resources:DeprecationWarning # - ignore:Use setlocale\(\), getencoding\(\) and getlocale\(\) instead:DeprecationWarning:nipype + ignore:.*Use setlocale.* instead:DeprecationWarning:nipype [coverage:run] include = heudiconv/*