Skip to content

Commit 6501da1

Browse files
STY: Apply ruff/flake8-implicit-str-concat rule ISC001 (#436)
ISC001 Implicitly concatenated string literals on one line This rule is currently disabled because it conflicts with the formatter: astral-sh/ruff#8272
1 parent 4ed9c9f commit 6501da1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

smriprep/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727

2828
# `python -m smriprep` typically displays the command as __main__.py
2929
if '__main__.py' in sys.argv[0]:
30-
sys.argv[0] = '%s -m smriprep' % sys.executable
30+
sys.argv[0] = f'{sys.executable} -m smriprep'
3131
main()

smriprep/workflows/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def init_smriprep_wf(
168168
freesurfer_home=os.getenv('FREESURFER_HOME'),
169169
spaces=spaces.get_fs_spaces(),
170170
),
171-
name='fsdir_run_%s' % run_uuid.replace('-', '_'),
171+
name='fsdir_run_{}'.format(run_uuid.replace('-', '_')),
172172
run_without_submitting=True,
173173
)
174174
if fs_subjects_dir is not None:
@@ -186,7 +186,7 @@ def init_smriprep_wf(
186186
longitudinal=longitudinal,
187187
low_mem=low_mem,
188188
msm_sulc=msm_sulc,
189-
name='single_subject_%s_wf' % subject_id,
189+
name=f'single_subject_{subject_id}_wf',
190190
omp_nthreads=omp_nthreads,
191191
output_dir=output_dir,
192192
skull_strip_fixed_seed=skull_strip_fixed_seed,

smriprep/workflows/fit/registration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def init_register_template_wf(
128128
# Append template citations to description
129129
for template in templates:
130130
template_meta = get_metadata(template.split(':')[0])
131-
template_refs = ['@%s' % template.split(':')[0].lower()]
131+
template_refs = ['@{}'.format(template.split(':')[0].lower())]
132132

133133
if template_meta.get('RRID', None):
134-
template_refs += ['RRID:%s' % template_meta['RRID']]
134+
template_refs += [f'RRID:{template_meta["RRID"]}']
135135

136136
workflow.__desc__ += """\
137137
*{template_name}* [{template_refs}; TemplateFlow ID: {template}]""".format(

0 commit comments

Comments
 (0)