File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ def test_parser_valid(tmp_path, args):
82
82
('1000MB' , 1 ),
83
83
('1T' , 1000 ),
84
84
('1TB' , 1000 ),
85
- ('%dK' % 1e6 , 1 ),
86
- ('%dKB' % 1e6 , 1 ),
87
- ('%dB' % 1e9 , 1 ),
85
+ ('1000000K' , 1 ),
86
+ ('1000000KB' , 1 ),
87
+ ('1000000000B' , 1 ),
88
88
],
89
89
)
90
90
def test_memory_arg (tmp_path , argval , gb ):
Original file line number Diff line number Diff line change 149
149
# Just get so analytics track one hit
150
150
from contextlib import suppress
151
151
152
- from requests import ConnectionError , ReadTimeout
153
- from requests import get as _get_url
152
+ import requests
154
153
155
- with suppress ((ConnectionError , ReadTimeout )):
156
- _get_url ('https://rig.mit.edu/et/projects/nipy/nipype' , timeout = 0.05 )
154
+ with suppress ((requests . ConnectionError , requests . ReadTimeout )):
155
+ requests . get ('https://rig.mit.edu/et/projects/nipy/nipype' , timeout = 0.05 )
157
156
158
157
# Execution environment
159
158
_exec_env = os .name
Original file line number Diff line number Diff line change @@ -242,13 +242,13 @@ def _generate_segment(self):
242
242
reg = {
243
243
'FSL' : [
244
244
'FSL <code>flirt</code> with boundary-based registration'
245
- ' (BBR) metric - %d dof' % dof ,
245
+ f ' (BBR) metric - { dof } dof' ,
246
246
'FSL <code>flirt</code> rigid registration - 6 dof' ,
247
247
],
248
248
'FreeSurfer' : [
249
249
'FreeSurfer <code>bbregister</code> '
250
- '(boundary-based registration, BBR) - %d dof' % dof ,
251
- 'FreeSurfer <code>mri_coreg</code> - %d dof' % dof ,
250
+ f '(boundary-based registration, BBR) - { dof } dof' ,
251
+ f 'FreeSurfer <code>mri_coreg</code> - { dof } dof' ,
252
252
],
253
253
}[self .inputs .registration ][self .inputs .fallback ]
254
254
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def process_crashfile(crashfile):
116
116
scope .set_extra (k , strv [0 ])
117
117
else :
118
118
for i , chunk in enumerate (strv ):
119
- scope .set_extra ('%s_%02d' % ( k , i ) , chunk )
119
+ scope .set_extra (f' { k } _ { i :02d } ' , chunk )
120
120
121
121
fingerprint = ''
122
122
issue_title = f'{ node_name } : { gist } '
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def init_bold_stc_wf(
106
106
frac = config .workflow .slice_time_ref
107
107
tzero = np .round (first + frac * (last - first ), 3 )
108
108
109
- afni_ver = '' .join ('% 02d' % v for v in afni .Info ().version () or [])
109
+ afni_ver = '' .join (f' { v : 02d} ' for v in afni .Info ().version () or [])
110
110
workflow = Workflow (name = name )
111
111
workflow .__desc__ = f"""\
112
112
BOLD runs were slice-time corrected to { tzero :0.3g} s ({ frac :g} of slice acquisition range
You can’t perform that action at this time.
0 commit comments