Skip to content

Commit

Permalink
STY: Apply ruff/flake8-implicit-str-concat rule ISC001 (#436)
Browse files Browse the repository at this point in the history
ISC001 Implicitly concatenated string literals on one line

This rule is currently disabled because it conflicts with the formatter:
	astral-sh/ruff#8272
  • Loading branch information
DimitriPapadopoulos authored May 4, 2024
1 parent 4ed9c9f commit 6501da1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion smriprep/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@

# `python -m smriprep` typically displays the command as __main__.py
if '__main__.py' in sys.argv[0]:
sys.argv[0] = '%s -m smriprep' % sys.executable
sys.argv[0] = f'{sys.executable} -m smriprep'
main()
4 changes: 2 additions & 2 deletions smriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def init_smriprep_wf(
freesurfer_home=os.getenv('FREESURFER_HOME'),
spaces=spaces.get_fs_spaces(),
),
name='fsdir_run_%s' % run_uuid.replace('-', '_'),
name='fsdir_run_{}'.format(run_uuid.replace('-', '_')),
run_without_submitting=True,
)
if fs_subjects_dir is not None:
Expand All @@ -186,7 +186,7 @@ def init_smriprep_wf(
longitudinal=longitudinal,
low_mem=low_mem,
msm_sulc=msm_sulc,
name='single_subject_%s_wf' % subject_id,
name=f'single_subject_{subject_id}_wf',
omp_nthreads=omp_nthreads,
output_dir=output_dir,
skull_strip_fixed_seed=skull_strip_fixed_seed,
Expand Down
4 changes: 2 additions & 2 deletions smriprep/workflows/fit/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def init_register_template_wf(
# Append template citations to description
for template in templates:
template_meta = get_metadata(template.split(':')[0])
template_refs = ['@%s' % template.split(':')[0].lower()]
template_refs = ['@{}'.format(template.split(':')[0].lower())]

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

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

0 comments on commit 6501da1

Please sign in to comment.