@@ -226,7 +226,7 @@ def test_linear_save(tmpdir, data_path, get_testdata, image_orientation, sw_tool
226226 elif sw_tool == "fs" :
227227 ext = ".lta"
228228
229- xfm_fname1 = "M.%s%s" % ( sw_tool , ext )
229+ xfm_fname1 = f "M.{ sw_tool } { ext } "
230230 xfm .to_filename (xfm_fname1 , fmt = sw_tool )
231231
232232 xfm_fname2 = str (data_path / "affine-%s.%s%s" ) % (image_orientation , sw_tool , ext )
@@ -257,7 +257,7 @@ def test_apply_linear_transform(tmpdir, get_testdata, get_testmask, image_orient
257257 msk .to_filename ("mask.nii.gz" )
258258
259259 # Write out transform file (software-dependent)
260- xfm_fname = "M.%s%s" % ( sw_tool , ext )
260+ xfm_fname = f "M.{ sw_tool } { ext } "
261261 # Change reference dataset for AFNI & oblique
262262 if (sw_tool , image_orientation ) == ("afni" , "oblique" ):
263263 io .afni .AFNILinearTransform .from_ras (
@@ -278,7 +278,7 @@ def test_apply_linear_transform(tmpdir, get_testdata, get_testmask, image_orient
278278 # skip test if command is not available on host
279279 exe = cmd .split (" " , 1 )[0 ]
280280 if not shutil .which (exe ):
281- pytest .skip ("Command {} not found on host" . format ( exe ) )
281+ pytest .skip (f "Command { exe } not found on host" )
282282
283283 # resample mask
284284 exit_code = check_call ([cmd ], shell = True )
0 commit comments