Skip to content

Commit 3951685

Browse files
committed
FIX: PEP8 - E228 missing whitespace around modulo operator
1 parent f8a8eb4 commit 3951685

32 files changed

+103
-103
lines changed

examples/fmri_freesurfer_smooth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
def subjectinfo(subject_id):
450450
from nipype.interfaces.base import Bunch
451451
from copy import deepcopy
452-
print("Subject ID: %s\n"%str(subject_id))
452+
print("Subject ID: %s\n" %str(subject_id))
453453
output = []
454454
names = ['Task-Odd','Task-Even']
455455
for r in range(4):
@@ -537,7 +537,7 @@ def subjectinfo(subject_id):
537537
datasink.inputs.substitutions = []
538538

539539
def getsubs(subject_id):
540-
subs = [('_subject_id_%s/'%subject_id,'')]
540+
subs = [('_subject_id_%s/' %subject_id,'')]
541541
return subs
542542

543543
# store relevant outputs from various stages of the 1st level analysis
@@ -607,7 +607,7 @@ def ordersubjects(files, subj_list):
607607
outlist = []
608608
for s in subj_list:
609609
for f in files:
610-
if '/%s/'%s in f:
610+
if '/%s/' %s in f:
611611
outlist.append(f)
612612
continue
613613
print(outlist)

examples/fmri_fsl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def getmiddlevolume(func):
189189
"""
190190

191191
def getthreshop(thresh):
192-
return '-thr %.10f -Tmin -bin'%(0.1*thresh[0][1])
192+
return '-thr %.10f -Tmin -bin' %(0.1*thresh[0][1])
193193
preproc.connect(getthresh, ('out_stat', getthreshop), threshold, 'op_string')
194194

195195
"""

examples/fmri_fsl_reuse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def num_copes(files):
199199
def subjectinfo(subject_id):
200200
from nipype.interfaces.base import Bunch
201201
from copy import deepcopy
202-
print("Subject ID: %s\n"%str(subject_id))
202+
print("Subject ID: %s\n" %str(subject_id))
203203
output = []
204204
names = ['Task-Odd','Task-Even']
205205
for r in range(4):

examples/fmri_nipy_glm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
def subjectinfo(subject_id):
160160
from nipype.interfaces.base import Bunch
161161
from copy import deepcopy
162-
print("Subject ID: %s\n"%str(subject_id))
162+
print("Subject ID: %s\n" %str(subject_id))
163163
output = []
164164
names = ['Task-Odd','Task-Even']
165165
for r in range(4):

examples/fmri_spm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
def subjectinfo(subject_id):
184184
from nipype.interfaces.base import Bunch
185185
from copy import deepcopy
186-
print("Subject ID: %s\n"%str(subject_id))
186+
print("Subject ID: %s\n" %str(subject_id))
187187
output = []
188188
names = ['Task-Odd','Task-Even']
189189
for r in range(4):

examples/fmri_spm_dartel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def pickFieldFlow(dartel_flow_fields, subject_id):
301301
from nipype.utils.filemanip import split_filename
302302
for f in dartel_flow_fields:
303303
_, name, _ = split_filename(f)
304-
if name.find("subject_id_%s"%subject_id):
304+
if name.find("subject_id_%s" %subject_id):
305305
return f
306306

307307
raise Exception
@@ -326,7 +326,7 @@ def pickFieldFlow(dartel_flow_fields, subject_id):
326326
def subjectinfo(subject_id):
327327
from nipype.interfaces.base import Bunch
328328
from copy import deepcopy
329-
print("Subject ID: %s\n"%str(subject_id))
329+
print("Subject ID: %s\n" %str(subject_id))
330330
output = []
331331
names = ['Task-Odd','Task-Even']
332332
for r in range(4):

examples/fmri_spm_face.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def makelist(item):
226226
# Specify the subject directories
227227
subject_list = ['M03953']
228228
# Map field names to individual subject runs.
229-
info = dict(func=[['RawEPI', 'subject_id', 5, ["_%04d"%i for i in range(6,357)]]],
229+
info = dict(func=[['RawEPI', 'subject_id', 5, ["_%04d" %i for i in range(6,357)]]],
230230
struct=[['Structural', 'subject_id', 7, '']])
231231

232232
infosource = pe.Node(interface=util.IdentityInterface(fields=['subject_id']),

examples/fmri_spm_nested.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
def subjectinfo(subject_id):
290290
from nipype.interfaces.base import Bunch
291291
from copy import deepcopy
292-
print("Subject ID: %s\n"%str(subject_id))
292+
print("Subject ID: %s\n" %str(subject_id))
293293
output = []
294294
names = ['Task-Odd','Task-Even']
295295
for r in range(4):

nipype/algorithms/modelgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def _generate_standard_design(self, infolist,
364364
for j, scanno in enumerate(out):
365365
colidx = len(sessinfo[i]['regress'])
366366
sessinfo[i]['regress'].insert(colidx, dict(name='', val=[]))
367-
sessinfo[i]['regress'][colidx]['name'] = 'Outlier%d'%(j+1)
367+
sessinfo[i]['regress'][colidx]['name'] = 'Outlier%d' %(j+1)
368368
sessinfo[i]['regress'][colidx]['val'] = \
369369
np.zeros((1, numscans))[0].tolist()
370370
sessinfo[i]['regress'][colidx]['val'][int(scanno)] = 1
@@ -782,7 +782,7 @@ def _generate_clustered_design(self, infolist):
782782
if hasattr(infoout[i], 'regressors') and infoout[i].regressors:
783783
if not infoout[i].regressor_names:
784784
infoout[i].regressor_names = \
785-
['R%d'%j for j in range(len(infoout[i].regressors))]
785+
['R%d' %j for j in range(len(infoout[i].regressors))]
786786
else:
787787
infoout[i].regressors = []
788788
infoout[i].regressor_names = []

nipype/fixes/numpy/testing/noseclasses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def check_output(self, want, got, optionflags):
133133

134134
# try to normalize out 32 and 64 bit default int sizes
135135
for sz in [4,8]:
136-
got = got.replace("'<i%d'"%sz,"int")
137-
want = want.replace("'<i%d'"%sz,"int")
136+
got = got.replace("'<i%d'" %sz,"int")
137+
want = want.replace("'<i%d'" %sz,"int")
138138

139139
ret = doctest.OutputChecker.check_output(self, want,
140140
got, optionflags)

0 commit comments

Comments
 (0)