Skip to content

Commit

Permalink
Ran pre-commit on everything, black decided to adjust some formatting…
Browse files Browse the repository at this point in the history
… (no functional changes)
  • Loading branch information
yarikoptic committed Dec 8, 2023
1 parent 16b5098 commit 9591160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions heudiconv/heuristics/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <series-number>-<something else>, "
f"and <series-number> is a numeric number. Got series_id={s.series_id}")
f"and <series-number> 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):
Expand Down
5 changes: 3 additions & 2 deletions heudiconv/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9591160

Please sign in to comment.