Skip to content

Commit 1df2021

Browse files
committed
FIX: PEP8 - indentation correction for E121, E123, E124, E125, E126, E127, E128 - 2nd clean up
1 parent f4d89d6 commit 1df2021

Some content is hidden

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

79 files changed

+835
-839
lines changed

build_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class APIDocs(TempInstall):
7070

7171
user_options = [
7272
('None', None, 'this command has no options'),
73-
]
73+
]
7474

7575
def run(self):
7676
# First build the project and install it to a temporary location.

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@
212212
# Grouping the document tree into LaTeX files. List of tuples
213213
# (source start file, target name, title, author, documentclass [howto/manual]).
214214
latex_documents = [
215-
('documentation', 'nipype.tex', u'nipype Documentation',
216-
u'Neuroimaging in Python team', 'manual'),
215+
('documentation', 'nipype.tex', u'nipype Documentation',
216+
u'Neuroimaging in Python team', 'manual'),
217217
]
218218

219219
# The name of an image file (relative to this directory) to place at the top of

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self, docstring, config={}):
114114
'References': '',
115115
'Examples': '',
116116
'index': {}
117-
}
117+
}
118118

119119
self._parse()
120120

doc/sphinxext/numpy_ext/numpydoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
4848
lines[:] = str(doc).split(u"\n")
4949

5050
if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
51-
obj.__name__:
51+
obj.__name__:
5252
if hasattr(obj, '__module__'):
5353
v = dict(full_name=u"%s.%s" % (obj.__module__, obj.__name__))
5454
else:

examples/dmri_camino_dti.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def get_affine(volume):
268268
tractography.connect([(dtifit, fa, [("tensor_fitted", "in_file")])])
269269
tractography.connect([(fa, analyzeheader_fa, [("fa", "in_file")])])
270270
tractography.connect([(inputnode, analyzeheader_fa, [(('dwi', get_vox_dims), 'voxel_dims'),
271-
(('dwi', get_data_dims), 'data_dims')])])
271+
(('dwi', get_data_dims), 'data_dims')])])
272272
tractography.connect([(fa, fa2nii, [('fa', 'data_file')])])
273273
tractography.connect([(inputnode, fa2nii, [(('dwi', get_affine), 'affine')])])
274274
tractography.connect([(analyzeheader_fa, fa2nii, [('header', 'header_file')])])
@@ -277,7 +277,7 @@ def get_affine(volume):
277277
tractography.connect([(dtifit, trace, [("tensor_fitted", "in_file")])])
278278
tractography.connect([(trace, analyzeheader_trace, [("trace", "in_file")])])
279279
tractography.connect([(inputnode, analyzeheader_trace, [(('dwi', get_vox_dims), 'voxel_dims'),
280-
(('dwi', get_data_dims), 'data_dims')])])
280+
(('dwi', get_data_dims), 'data_dims')])])
281281
tractography.connect([(trace, trace2nii, [('trace', 'data_file')])])
282282
tractography.connect([(inputnode, trace2nii, [(('dwi', get_affine), 'affine')])])
283283
tractography.connect([(analyzeheader_trace, trace2nii, [('header', 'header_file')])])
@@ -287,10 +287,10 @@ def get_affine(volume):
287287
tractography.connect([(trackpico, cam2trk_pico, [('tracked', 'in_file')])])
288288
tractography.connect([(trackdt, cam2trk_dt, [('tracked', 'in_file')])])
289289
tractography.connect([(inputnode, cam2trk_pico, [(('dwi', get_vox_dims), 'voxel_dims'),
290-
(('dwi', get_data_dims), 'data_dims')])])
290+
(('dwi', get_data_dims), 'data_dims')])])
291291

292292
tractography.connect([(inputnode, cam2trk_dt, [(('dwi', get_vox_dims), 'voxel_dims'),
293-
(('dwi', get_data_dims), 'data_dims')])])
293+
(('dwi', get_data_dims), 'data_dims')])])
294294

295295

296296
"""
@@ -303,9 +303,9 @@ def get_affine(volume):
303303
workflow.base_dir = os.path.abspath('camino_dti_tutorial')
304304
workflow.connect([(infosource, datasource, [('subject_id', 'subject_id')]),
305305
(datasource, tractography, [('dwi', 'inputnode.dwi'),
306-
('bvals', 'inputnode.bvals'),
307-
('bvecs', 'inputnode.bvecs')
308-
])
306+
('bvals', 'inputnode.bvals'),
307+
('bvecs', 'inputnode.bvecs')
308+
])
309309
])
310310
"""
311311
The following functions run the whole workflow and produce a .dot and .png graph of the processing pipeline.

examples/dmri_connectivity.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def select_aparc_annot(list_of_files):
464464
mapping.connect([(dtifit, fa, [("tensor_fitted", "in_file")])])
465465
mapping.connect([(fa, analyzeheader_fa, [("fa", "in_file")])])
466466
mapping.connect([(inputnode, analyzeheader_fa, [(('dwi', get_vox_dims), 'voxel_dims'),
467-
(('dwi', get_data_dims), 'data_dims')])])
467+
(('dwi', get_data_dims), 'data_dims')])])
468468
mapping.connect([(fa, fa2nii, [('fa', 'data_file')])])
469469
mapping.connect([(inputnode, fa2nii, [(('dwi', get_affine), 'affine')])])
470470
mapping.connect([(analyzeheader_fa, fa2nii, [('header', 'header_file')])])
@@ -473,7 +473,7 @@ def select_aparc_annot(list_of_files):
473473
mapping.connect([(dtifit, trace, [("tensor_fitted", "in_file")])])
474474
mapping.connect([(trace, analyzeheader_trace, [("trace", "in_file")])])
475475
mapping.connect([(inputnode, analyzeheader_trace, [(('dwi', get_vox_dims), 'voxel_dims'),
476-
(('dwi', get_data_dims), 'data_dims')])])
476+
(('dwi', get_data_dims), 'data_dims')])])
477477
mapping.connect([(trace, trace2nii, [('trace', 'data_file')])])
478478
mapping.connect([(inputnode, trace2nii, [(('dwi', get_affine), 'affine')])])
479479
mapping.connect([(analyzeheader_trace, trace2nii, [('header', 'header_file')])])
@@ -490,7 +490,7 @@ def select_aparc_annot(list_of_files):
490490
(camino2trackvis, trk2camino, [['trackvis', 'in_file']])
491491
])
492492
mapping.connect([(inputnode, camino2trackvis, [(('dwi', get_vox_dims), 'voxel_dims'),
493-
(('dwi', get_data_dims), 'data_dims')])])
493+
(('dwi', get_data_dims), 'data_dims')])])
494494

495495
"""
496496
Here the CMTK connectivity mapping nodes are connected.
@@ -571,11 +571,11 @@ def select_aparc_annot(list_of_files):
571571
connectivity.connect([
572572
(infosource, datasource, [('subject_id', 'subject_id')]),
573573
(datasource, mapping, [('dwi', 'inputnode.dwi'),
574-
('bvals', 'inputnode.bvals'),
575-
('bvecs', 'inputnode.bvecs')
576-
]),
577-
(infosource, mapping, [('subject_id', 'inputnode.subject_id')])
578-
])
574+
('bvals', 'inputnode.bvals'),
575+
('bvecs', 'inputnode.bvecs')
576+
]),
577+
(infosource, mapping, [('subject_id', 'inputnode.subject_id')])
578+
])
579579

580580
"""
581581
The following functions run the whole workflow and produce graphs describing the processing pipeline.

examples/dmri_connectivity_advanced.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -581,11 +581,11 @@
581581
connectivity.connect([
582582
(infosource, datasource, [('subject_id', 'subject_id')]),
583583
(datasource, mapping, [('dwi', 'inputnode.dwi'),
584-
('bvals', 'inputnode.bvals'),
585-
('bvecs', 'inputnode.bvecs')
586-
]),
587-
(infosource, mapping, [('subject_id', 'inputnode.subject_id')])
588-
])
584+
('bvals', 'inputnode.bvals'),
585+
('bvecs', 'inputnode.bvecs')
586+
]),
587+
(infosource, mapping, [('subject_id', 'inputnode.subject_id')])
588+
])
589589

590590
"""
591591
The following functions run the whole workflow and produce a .dot and .png graph of the processing pipeline.

examples/dmri_dtk_dti.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@
154154
"""
155155

156156
computeTensor.connect([
157-
(fslroi, bet, [('roi_file', 'in_file')]),
158-
(eddycorrect, dtifit, [('outputnode.eddy_corrected', 'DWI')])
159-
])
157+
(fslroi, bet, [('roi_file', 'in_file')]),
158+
(eddycorrect, dtifit, [('outputnode.eddy_corrected', 'DWI')])
159+
])
160160

161161

162162
"""
@@ -177,8 +177,8 @@
177177
"""
178178

179179
tractography.connect([
180-
(dtk_tracker, smooth_trk, [('track_file', 'track_file')])
181-
])
180+
(dtk_tracker, smooth_trk, [('track_file', 'track_file')])
181+
])
182182

183183

184184
"""
@@ -201,15 +201,15 @@ def getstripdir(subject_id):
201201
dwiproc = pe.Workflow(name="dwiproc")
202202
dwiproc.base_dir = os.path.abspath('dtk_dti_tutorial')
203203
dwiproc.connect([
204-
(infosource, datasource, [('subject_id', 'subject_id')]),
205-
(datasource, computeTensor, [('dwi', 'fslroi.in_file'),
206-
('bvals', 'dtifit.bvals'),
207-
('bvecs', 'dtifit.bvecs'),
208-
('dwi', 'eddycorrect.inputnode.in_file')]),
209-
(computeTensor, tractography, [('bet.mask_file', 'dtk_tracker.mask1_file'),
210-
('dtifit.tensor', 'dtk_tracker.tensor_file')
211-
])
212-
])
204+
(infosource, datasource, [('subject_id', 'subject_id')]),
205+
(datasource, computeTensor, [('dwi', 'fslroi.in_file'),
206+
('bvals', 'dtifit.bvals'),
207+
('bvecs', 'dtifit.bvecs'),
208+
('dwi', 'eddycorrect.inputnode.in_file')]),
209+
(computeTensor, tractography, [('bet.mask_file', 'dtk_tracker.mask1_file'),
210+
('dtifit.tensor', 'dtk_tracker.tensor_file')
211+
])
212+
])
213213

214214
if __name__ == '__main__':
215215
dwiproc.run()

examples/dmri_dtk_odf.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@
153153
"""
154154

155155
compute_ODF.connect([
156-
(fslroi, bet, [('roi_file', 'in_file')]),
157-
(eddycorrect, odf_recon, [('outputnode.eddy_corrected', 'DWI')]),
158-
(eddycorrect, hardi_mat, [('outputnode.eddy_corrected', 'reference_file')]),
159-
(hardi_mat, odf_recon, [('out_file', 'matrix')])
160-
])
156+
(fslroi, bet, [('roi_file', 'in_file')]),
157+
(eddycorrect, odf_recon, [('outputnode.eddy_corrected', 'DWI')]),
158+
(eddycorrect, hardi_mat, [('outputnode.eddy_corrected', 'reference_file')]),
159+
(hardi_mat, odf_recon, [('out_file', 'matrix')])
160+
])
161161

162162

163163
"""
@@ -177,8 +177,8 @@
177177
"""
178178

179179
tractography.connect([
180-
(odf_tracker, smooth_trk, [('track_file', 'track_file')])
181-
])
180+
(odf_tracker, smooth_trk, [('track_file', 'track_file')])
181+
])
182182

183183

184184
"""
@@ -189,16 +189,16 @@
189189
dwiproc = pe.Workflow(name="dwiproc")
190190
dwiproc.base_dir = os.path.abspath('dtk_odf_tutorial')
191191
dwiproc.connect([
192-
(infosource, datasource, [('subject_id', 'subject_id')]),
193-
(datasource, compute_ODF, [('dwi', 'fslroi.in_file'),
194-
('bvals', 'hardi_mat.bvals'),
195-
('bvecs', 'hardi_mat.bvecs'),
196-
('dwi', 'eddycorrect.inputnode.in_file')]),
197-
(compute_ODF, tractography, [('bet.mask_file', 'odf_tracker.mask1_file'),
198-
('odf_recon.ODF', 'odf_tracker.ODF'),
199-
('odf_recon.max', 'odf_tracker.max')
200-
])
201-
])
192+
(infosource, datasource, [('subject_id', 'subject_id')]),
193+
(datasource, compute_ODF, [('dwi', 'fslroi.in_file'),
194+
('bvals', 'hardi_mat.bvals'),
195+
('bvecs', 'hardi_mat.bvecs'),
196+
('dwi', 'eddycorrect.inputnode.in_file')]),
197+
(compute_ODF, tractography, [('bet.mask_file', 'odf_tracker.mask1_file'),
198+
('odf_recon.ODF', 'odf_tracker.ODF'),
199+
('odf_recon.max', 'odf_tracker.max')
200+
])
201+
])
202202

203203
dwiproc.inputs.compute_ODF.hardi_mat.oblique_correction = True
204204
dwiproc.inputs.compute_ODF.odf_recon.n_directions = 31

examples/dmri_fsl_dti.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@
7676
bvals=[['subject_id', 'bvals']],
7777
seed_file=[['subject_id', 'MASK_average_thal_right']],
7878
target_masks=[['subject_id', ['MASK_average_M1_right',
79-
'MASK_average_S1_right',
80-
'MASK_average_occipital_right',
81-
'MASK_average_pfc_right',
82-
'MASK_average_pmc_right',
83-
'MASK_average_ppc_right',
84-
'MASK_average_temporal_right']]])
79+
'MASK_average_S1_right',
80+
'MASK_average_occipital_right',
81+
'MASK_average_pfc_right',
82+
'MASK_average_pmc_right',
83+
'MASK_average_ppc_right',
84+
'MASK_average_temporal_right']]])
8585

8686
infosource = pe.Node(interface=util.IdentityInterface(fields=['subject_id']),
8787
name="infosource")
@@ -165,11 +165,11 @@
165165
"""
166166

167167
computeTensor.connect([
168-
(fslroi, bet, [('roi_file', 'in_file')]),
169-
(eddycorrect, dtifit, [('outputnode.eddy_corrected', 'dwi')]),
170-
(infosource, dtifit, [['subject_id', 'base_name']]),
171-
(bet, dtifit, [('mask_file', 'mask')])
172-
])
168+
(fslroi, bet, [('roi_file', 'in_file')]),
169+
(eddycorrect, dtifit, [('outputnode.eddy_corrected', 'dwi')]),
170+
(infosource, dtifit, [['subject_id', 'base_name']]),
171+
(bet, dtifit, [('mask_file', 'mask')])
172+
])
173173

174174

175175
"""
@@ -223,9 +223,9 @@
223223

224224
tractography.add_nodes([bedpostx, flirt])
225225
tractography.connect([(bedpostx, probtrackx, [('outputnode.thsamples', 'thsamples'),
226-
('outputnode.phsamples', 'phsamples'),
227-
('outputnode.fsamples', 'fsamples')
228-
]),
226+
('outputnode.phsamples', 'phsamples'),
227+
('outputnode.fsamples', 'fsamples')
228+
]),
229229
(probtrackx, findthebiggest, [('targets', 'in_files')]),
230230
(flirt, probtrackx, [('out_matrix_file', 'xfm')])
231231
])
@@ -252,24 +252,24 @@ def getstripdir(subject_id):
252252
dwiproc = pe.Workflow(name="dwiproc")
253253
dwiproc.base_dir = os.path.abspath('fsl_dti_tutorial')
254254
dwiproc.connect([
255-
(infosource, datasource, [('subject_id', 'subject_id')]),
256-
(datasource, computeTensor, [('dwi', 'fslroi.in_file'),
257-
('bvals', 'dtifit.bvals'),
258-
('bvecs', 'dtifit.bvecs'),
259-
('dwi', 'eddycorrect.inputnode.in_file')]),
260-
(datasource, tractography, [('bvals', 'bedpostx.inputnode.bvals'),
261-
('bvecs', 'bedpostx.inputnode.bvecs'),
262-
('seed_file', 'probtrackx.seed'),
263-
('target_masks', 'probtrackx.target_masks')
264-
]),
265-
(computeTensor, tractography, [('eddycorrect.outputnode.eddy_corrected', 'bedpostx.inputnode.dwi'),
266-
('bet.mask_file', 'bedpostx.inputnode.mask'),
267-
('bet.mask_file', 'probtrackx.mask'),
268-
('fslroi.roi_file', 'flirt.reference')]),
269-
(infosource, datasink, [('subject_id', 'container'),
270-
(('subject_id', getstripdir), 'strip_dir')]),
271-
(tractography, datasink, [('findthebiggest.out_file', 'fbiggest.@biggestsegmentation')])
272-
])
255+
(infosource, datasource, [('subject_id', 'subject_id')]),
256+
(datasource, computeTensor, [('dwi', 'fslroi.in_file'),
257+
('bvals', 'dtifit.bvals'),
258+
('bvecs', 'dtifit.bvecs'),
259+
('dwi', 'eddycorrect.inputnode.in_file')]),
260+
(datasource, tractography, [('bvals', 'bedpostx.inputnode.bvals'),
261+
('bvecs', 'bedpostx.inputnode.bvecs'),
262+
('seed_file', 'probtrackx.seed'),
263+
('target_masks', 'probtrackx.target_masks')
264+
]),
265+
(computeTensor, tractography, [('eddycorrect.outputnode.eddy_corrected', 'bedpostx.inputnode.dwi'),
266+
('bet.mask_file', 'bedpostx.inputnode.mask'),
267+
('bet.mask_file', 'probtrackx.mask'),
268+
('fslroi.roi_file', 'flirt.reference')]),
269+
(infosource, datasink, [('subject_id', 'container'),
270+
(('subject_id', getstripdir), 'strip_dir')]),
271+
(tractography, datasink, [('findthebiggest.out_file', 'fbiggest.@biggestsegmentation')])
272+
])
273273

274274
if __name__ == '__main__':
275275
dwiproc.run()

examples/dmri_mrtrix_dti.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@
250250
dwiproc = pe.Workflow(name="dwiproc")
251251
dwiproc.base_dir = os.path.abspath('dmri_mrtrix_dti')
252252
dwiproc.connect([
253-
(infosource, datasource, [('subject_id', 'subject_id')]),
254-
(datasource, tractography, [('dwi', 'inputnode.dwi'),
255-
('bvals', 'inputnode.bvals'),
256-
('bvecs', 'inputnode.bvecs')
257-
])
258-
])
253+
(infosource, datasource, [('subject_id', 'subject_id')]),
254+
(datasource, tractography, [('dwi', 'inputnode.dwi'),
255+
('bvals', 'inputnode.bvals'),
256+
('bvecs', 'inputnode.bvecs')
257+
])
258+
])
259259

260260
if __name__ == '__main__':
261261
dwiproc.run()

0 commit comments

Comments
 (0)