Skip to content

Commit 4aa22e7

Browse files
committed
STY: Pass kwargs explicitly
1 parent 728c011 commit 4aa22e7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

fmriprep/reports/core.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def run_reports(
3434
bootstrap_file=None,
3535
out_filename='report.html',
3636
reportlets_dir=None,
37-
entities=None,
3837
errorname='report.err',
38+
**entities,
3939
):
4040
"""
4141
Run the reports.
@@ -79,8 +79,6 @@ def generate_reports(
7979

8080
errors = []
8181
for subject_label in subject_list:
82-
entities = {}
83-
entities['subject'] = subject_label
8482

8583
# The number of sessions is intentionally not based on session_list but on the total number of sessions, because
8684
# I want the final derivatives folder to be the same whether sessions were ran one at a time or all-together.
@@ -105,8 +103,8 @@ def generate_reports(
105103
bootstrap_file=bootstrap_file,
106104
out_filename=html_report,
107105
reportlets_dir=reportlets_dir,
108-
entities=entities,
109106
errorname=f'report-{run_uuid}-{subject_label}.err',
107+
subject=subject_label,
110108
)
111109
# If the report generation failed, append the subject label for which it failed
112110
if report_error is not None:
@@ -129,7 +127,6 @@ def generate_reports(
129127
html_report = ''.join(
130128
[f"sub-{subject_label.lstrip('sub-')}", f'_ses-{session_label}', '_func.html']
131129
)
132-
entities['session'] = session_label
133130

134131
report_error = run_reports(
135132
output_dir,
@@ -138,8 +135,9 @@ def generate_reports(
138135
bootstrap_file=bootstrap_file,
139136
out_filename=html_report,
140137
reportlets_dir=reportlets_dir,
141-
entities=entities,
142138
errorname=f'report-{run_uuid}-{subject_label}-func.err',
139+
subject=subject_label,
140+
session=session_label,
143141
)
144142
# If the report generation failed, append the subject label for which it failed
145143
if report_error is not None:

0 commit comments

Comments
 (0)