diff --git a/smriprep/__main__.py b/smriprep/__main__.py index e7feaf9cfb..5a4cf20aa9 100644 --- a/smriprep/__main__.py +++ b/smriprep/__main__.py @@ -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() diff --git a/smriprep/workflows/base.py b/smriprep/workflows/base.py index f06c13eb05..730fe1f656 100644 --- a/smriprep/workflows/base.py +++ b/smriprep/workflows/base.py @@ -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: @@ -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, diff --git a/smriprep/workflows/fit/registration.py b/smriprep/workflows/fit/registration.py index 6365b3c7bc..fc78575721 100644 --- a/smriprep/workflows/fit/registration.py +++ b/smriprep/workflows/fit/registration.py @@ -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(