Skip to content

Commit

Permalink
Merge pull request #721 from yarikoptic/re-pre-commit
Browse files Browse the repository at this point in the history
Ran pre-commit on everything, black decided to adjust some formatting
  • Loading branch information
yarikoptic authored Dec 8, 2023
2 parents 16b5098 + 712c91d commit e259f35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ filterwarnings =
# <https://github.com/sensein/etelemetry-client/pull/44>
ignore:.*pkg_resources:DeprecationWarning
# <https://github.com/nipy/nipype/issues/3563>
ignore:Use setlocale\(\), getencoding\(\) and getlocale\(\) instead:DeprecationWarning:nipype
ignore:.*Use setlocale.* instead:DeprecationWarning:nipype

[coverage:run]
include = heudiconv/*
Expand Down

0 comments on commit e259f35

Please sign in to comment.