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 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/*