Skip to content

Commit f7e16fd

Browse files
committed
FIX: PEP8 - E261 at least two spaces before inline comment
1 parent 7f2020c commit f7e16fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+87
-87
lines changed

doc/sphinxext/autosummary_generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def get_documented_in_lines(lines, module=None, filename=None):
173173
continue
174174

175175
if line.strip().startswith(':'):
176-
continue # skip options
176+
continue # skip options
177177

178178
m = autosummary_item_re.match(line)
179179
if m:

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ def __init__(self, data):
3131
if isinstance(data, list):
3232
self._str = data
3333
else:
34-
self._str = data.split('\n') # store string as list of lines
34+
self._str = data.split('\n') # store string as list of lines
3535

3636
self.reset()
3737

3838
def __getitem__(self, n):
3939
return self._str[n]
4040

4141
def reset(self):
42-
self._l = 0 # current line nr
42+
self._l = 0 # current line nr
4343

4444
def read(self):
4545
if not self.eof():
@@ -136,7 +136,7 @@ def _is_at_section(self):
136136
if l1.startswith('.. index::'):
137137
return True
138138

139-
l2 = self._doc.peek(1).strip() # ---------- or ==========
139+
l2 = self._doc.peek(1).strip() # ---------- or ==========
140140
return l2.startswith('-'*len(l1)) or l2.startswith('='*len(l1))
141141

142142
def _strip(self, doc):
@@ -154,7 +154,7 @@ def _read_to_next_section(self):
154154
section = self._doc.read_to_next_empty_line()
155155

156156
while not self._is_at_section() and not self._doc.eof():
157-
if not self._doc.peek(-1).strip(): # previous line was empty
157+
if not self._doc.peek(-1).strip(): # previous line was empty
158158
section += ['']
159159

160160
section += self._doc.read_to_next_empty_line()
@@ -166,7 +166,7 @@ def _read_sections(self):
166166
data = self._read_to_next_section()
167167
name = data[0].strip()
168168

169-
if name.startswith('..'): # index section
169+
if name.startswith('..'): # index section
170170
yield name, data[1:]
171171
elif len(data) < 2:
172172
yield StopIteration
@@ -419,7 +419,7 @@ def header(text, style='-'):
419419
class FunctionDoc(NumpyDocString):
420420
def __init__(self, func, role='func', doc=None, config={}):
421421
self._f = func
422-
self._role = role # e.g. "func" or "meth"
422+
self._role = role # e.g. "func" or "meth"
423423

424424
if doc is None:
425425
if func is None:

examples/fmri_ants_openfmri.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def get_subjectinfo(subject_id, base_dir, task_id, model_id):
560560
for idx in range(n_tasks):
561561
taskidx = np.where(taskinfo[:, 0] == 'task%03d' % (idx + 1))
562562
conds.append([condition.replace(' ', '_') for condition
563-
in taskinfo[taskidx[0], 2]]) # if 'junk' not in condition])
563+
in taskinfo[taskidx[0], 2]]) # if 'junk' not in condition])
564564
files = sorted(glob(os.path.join(base_dir,
565565
subject_id,
566566
'BOLD',
@@ -1061,7 +1061,7 @@ def get_subs(subject_id, conds, run_id, model_id, task_id):
10611061
help="Model index" + defstr)
10621062
parser.add_argument('-x', '--subjectprefix', default='sub*',
10631063
help="Subject prefix" + defstr)
1064-
parser.add_argument('-t', '--task', default=1, #nargs='+',
1064+
parser.add_argument('-t', '--task', default=1, # nargs='+',
10651065
type=int, help="Task index" + defstr)
10661066
parser.add_argument('--hpfilter', default=120.,
10671067
type=float, help="High pass filter cutoff (in secs)" + defstr)

examples/fmri_fsl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def num_copes(files):
510510
# Specify the location of the data.
511511
data_dir = os.path.abspath('data')
512512
# Specify the subject directories
513-
subject_list = ['s1'] #, 's3']
513+
subject_list = ['s1'] # , 's3']
514514
# Map field names to individual subject runs.
515515
info = dict(func=[['subject_id', ['f3', 'f5', 'f7', 'f10']]],
516516
struct=[['subject_id', 'struct']])

examples/fmri_fsl_reuse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def num_copes(files):
140140
# Specify the location of the data.
141141
data_dir = os.path.abspath('data')
142142
# Specify the subject directories
143-
subject_list = ['s1'] #, 's3']
143+
subject_list = ['s1'] # , 's3']
144144
# Map field names to individual subject runs.
145145
info = dict(func=[['subject_id', ['f3', 'f5', 'f7', 'f10']]],
146146
struct=[['subject_id', 'struct']])

examples/fmri_openfmri.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def get_subs(subject_id, conds, model_id, task_id):
440440
help="Model index" + defstr)
441441
parser.add_argument('-x', '--subjectprefix', default='sub*',
442442
help="Subject prefix" + defstr)
443-
parser.add_argument('-t', '--task', default=1, #nargs='+',
443+
parser.add_argument('-t', '--task', default=1, # nargs='+',
444444
type=int, help="Task index" + defstr)
445445
parser.add_argument("-o", "--output_dir", dest="outdir",
446446
help="Output directory base")

examples/rsfmri_vol_surface_preprocessing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def get_names(files, suffix):
903903
datasink.inputs.base_directory = sink_directory
904904
datasink.inputs.container = subject_id
905905
datasink.inputs.substitutions = substitutions
906-
datasink.inputs.regexp_substitutions = regex_subs #(r'(/_.*(\d+/))', r'/run\2')
906+
datasink.inputs.regexp_substitutions = regex_subs # (r'(/_.*(\d+/))', r'/run\2')
907907
wf.connect(realign, 'realignment_parameters', datasink, 'resting.qa.motion')
908908
wf.connect(art, 'norm_files', datasink, 'resting.qa.art.@norm')
909909
wf.connect(art, 'intensity_files', datasink, 'resting.qa.art.@intensity')
@@ -934,7 +934,7 @@ def get_names(files, suffix):
934934
datasink2.inputs.base_directory = sink_directory
935935
datasink2.inputs.container = subject_id
936936
datasink2.inputs.substitutions = substitutions
937-
datasink2.inputs.regexp_substitutions = regex_subs #(r'(/_.*(\d+/))', r'/run\2')
937+
datasink2.inputs.regexp_substitutions = regex_subs # (r'(/_.*(\d+/))', r'/run\2')
938938
wf.connect(combiner, 'out_file',
939939
datasink2, 'resting.parcellations.grayo.@surface')
940940
return wf

examples/rsfmri_vol_surface_preprocessing_nipy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ def get_names(files, suffix):
910910
datasink.inputs.base_directory = sink_directory
911911
datasink.inputs.container = subject_id
912912
datasink.inputs.substitutions = substitutions
913-
datasink.inputs.regexp_substitutions = regex_subs #(r'(/_.*(\d+/))', r'/run\2')
913+
datasink.inputs.regexp_substitutions = regex_subs # (r'(/_.*(\d+/))', r'/run\2')
914914
wf.connect(realign, 'par_file', datasink, 'resting.qa.motion')
915915
wf.connect(art, 'norm_files', datasink, 'resting.qa.art.@norm')
916916
wf.connect(art, 'intensity_files', datasink, 'resting.qa.art.@intensity')
@@ -946,7 +946,7 @@ def get_names(files, suffix):
946946
datasink2.inputs.base_directory = sink_directory
947947
datasink2.inputs.container = subject_id
948948
datasink2.inputs.substitutions = substitutions
949-
datasink2.inputs.regexp_substitutions = regex_subs #(r'(/_.*(\d+/))', r'/run\2')
949+
datasink2.inputs.regexp_substitutions = regex_subs # (r'(/_.*(\d+/))', r'/run\2')
950950
wf.connect(combiner, 'out_file',
951951
datasink2, 'resting.parcellations.grayo.@surface')
952952
return wf

examples/workshop_dartmouth_2010.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
smooth = pe.Node(interface=fsl.Smooth(fwhm=6), name="smooth")
132132

133133
motion_correct_and_smooth = pe.Workflow(name="motion_correct_and_smooth")
134-
motion_correct_and_smooth.base_dir = os.path.abspath('.') # define where will be the root folder for the workflow
134+
motion_correct_and_smooth.base_dir = os.path.abspath('.') # define where will be the root folder for the workflow
135135
motion_correct_and_smooth.connect([
136136
(motion_correct, smooth, [('out_file', 'in_file')])
137137
])

nipype/algorithms/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@ def _run_interface(self, runtime):
544544
elif self.inputs.metric == 'euclidean':
545545
errvector = np.linalg.norm(diffvector, axis=1)
546546

547-
errvectorexp = np.zeros_like(mskvector, dtype=np.float32) # The default type is uint8
547+
errvectorexp = np.zeros_like(mskvector, dtype=np.float32) # The default type is uint8
548548
errvectorexp[msk_idxs] = errvector
549549

550550
# Get averaged error
551-
self._distance = np.average(errvector) # Only average the masked voxels
551+
self._distance = np.average(errvector) # Only average the masked voxels
552552

553553
errmap = errvectorexp.reshape(mapshape)
554554

0 commit comments

Comments
 (0)