Skip to content

Commit f298fdb

Browse files
committed
sty: ruff
1 parent 38ef46f commit f298fdb

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

fmriprep/cli/workflow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
a hard-limited memory-scope.
3131
3232
"""
33+
3334
import typing as ty
3435

3536
if ty.TYPE_CHECKING:
3637
from bids.layout import BIDSLayout
3738

39+
3840
def build_workflow(config_file, retval):
3941
"""Create the Nipype Workflow that supports the whole execution graph."""
4042

@@ -95,9 +97,7 @@ def build_workflow(config_file, retval):
9597
# Called with reports only
9698
if config.execution.reports_only:
9799
build_log.log(
98-
25,
99-
'Running --reports-only on %s',
100-
fmt_subjects_sessions(subject_session_list)
100+
25, 'Running --reports-only on %s', fmt_subjects_sessions(subject_session_list)
101101
)
102102
if not session_list:
103103
session_list = (
@@ -258,6 +258,7 @@ def create_processing_groups(
258258
) -> list[tuple[str]]:
259259
"""Generate a list of subject-session pairs to be processed."""
260260
from bids.layout import Query
261+
261262
subject_session_list = []
262263

263264
for subject in subject_list:

fmriprep/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ def get(flat=False):
792792
'seeds': seeds.get(),
793793
}
794794

795-
if (pg := settings['execution'].get('processing_groups')):
795+
if pg := settings['execution'].get('processing_groups'):
796796
settings['execution']['processing_groups'] = _serialize_pg(pg)
797797

798798
if not flat:
@@ -847,6 +847,7 @@ def init_spaces(checkpoint=True):
847847
# Make the SpatialReferences object available
848848
workflow.spaces = spaces
849849

850+
850851
def _serialize_pg(value: list[tuple[str, list[str] | None]]) -> list[str]:
851852
"""
852853
Serialize a list of participant-session tuples to be TOML-compatible.

fmriprep/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ def fmt_subjects_sessions(subses: list[tuple[str]], concat_limit: int = 1):
9090
else:
9191
output.append(f'sub-{subject} ses-{session}')
9292

93-
return ', '.join(output)
93+
return ', '.join(output)

fmriprep/workflows/base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ def init_fmriprep_wf():
105105
log_dir = log_dir / 'log' / config.execution.run_uuid
106106

107107
wf_name = '_'.join(
108-
('sub', subject_id,) +
109-
(('ses', ses_str) if ses_str else ()) +
110-
('wf',)
108+
(
109+
'sub',
110+
subject_id,
111+
)
112+
+ (('ses', ses_str) if ses_str else ())
113+
+ ('wf',)
111114
)
112115
single_subject_wf = init_single_subject_wf(subject_id, sessions, name=wf_name)
113116

0 commit comments

Comments
 (0)