Skip to content

Commit c08b0ee

Browse files
committed
FIX: PEP8 - E303 too many blank lines (2)
1 parent a79f91d commit c08b0ee

Some content is hidden

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

64 files changed

+0
-132
lines changed

build_docs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ class APIDocs(TempInstall):
7272
('None', None, 'this command has no options'),
7373
]
7474

75-
7675
def run(self):
7776
# First build the project and install it to a temporary location.
7877
TempInstall.run(self)
@@ -158,7 +157,6 @@ def zip_docs(self):
158157
os.path.join(relative, 'html_docs', f))
159158
zf.close()
160159

161-
162160
def finalize_options(self):
163161
""" Override the default for the documentation build
164162
directory.

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def _parse_param_list(self, content):
192192

193193
return params
194194

195-
196195
_name_rgx = re.compile(r"^\s*(:(?P<role>\w+):`(?P<name>[a-zA-Z0-9_.-]+)`|"
197196
r" (?P<name2>[a-zA-Z0-9_.-]+))\s*", re.X)
198197

doc/sphinxext/numpy_ext/docscrape_sphinx.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from nipype.external.six import string_types
66

77

8-
98
class SphinxDocString(NumpyDocString):
109
def __init__(self, docstring, config={}):
1110
self.use_plots = config.get('use_plots', False)

examples/dmri_dtk_dti.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
])
160160

161161

162-
163162
"""
164163
Setup for Tracktography
165164
-----------------------

examples/dmri_dtk_odf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@
160160
])
161161

162162

163-
164163
"""
165164
Setup for Tracktography
166165
-----------------------

examples/dmri_fsl_dti.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@
172172
])
173173

174174

175-
176175
"""
177176
Setup for Tracktography
178177
-----------------------

examples/fmri_fsl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import nipype.algorithms.rapidart as ra # artifact detection
3030

3131

32-
3332
"""
3433
Preliminaries
3534
-------------

examples/fmri_openfmri.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ def split_files(in_files, splits):
350350
wf.connect(registration, 'outputspec.transformed_files',
351351
splitfunc, 'in_files')
352352

353-
354353
"""
355354
Connect to a datasink
356355
"""

examples/fmri_spm_auditory.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
coregister.inputs.jobtype = 'estimate'
8888

8989

90-
9190
segment = pe.Node(interface=spm.Segment(), name="segment")
9291

9392
"""Uncomment the following line for faster execution
@@ -201,7 +200,6 @@ def get_vox_dims(volume):
201200
"""
202201

203202

204-
205203
l1pipeline = pe.Workflow(name='firstlevel')
206204
l1pipeline.connect([(preproc, l1analysis, [('realign.realignment_parameters',
207205
'modelspec.realignment_parameters')])])
@@ -221,7 +219,6 @@ def makelist(item):
221219
'modelspec.functional_runs')])])
222220

223221

224-
225222
"""
226223
Data specific components
227224
------------------------

examples/fmri_spm_face.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
coregister.inputs.jobtype = 'estimate'
8181

8282

83-
8483
segment = pe.Node(interface=spm.Segment(), name="segment")
8584
segment.inputs.save_bias_corrected = True
8685

examples/frontiers_paper/smoothing_comparison.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
'inputnode.mask_file')
5555

5656

57-
5857
recon_all = pe.Node(interface=fs.ReconAll(), name="recon_all")
5958

6059
surfregister = pe.Node(interface=fs.BBRegister(), name='surfregister')

examples/rsfmri_vol_surface_preprocessing.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,6 @@ def create_workflow(files,
634634
registration.inputs.inputspec.subjects_dir = subjects_dir
635635
registration.inputs.inputspec.target_image = target_file
636636

637-
638637
"""Use :class:`nipype.algorithms.rapidart` to determine which of the
639638
images in the functional series are outliers based on deviations in
640639
intensity or movement.
@@ -648,7 +647,6 @@ def create_workflow(files,
648647
art.inputs.mask_type = 'spm_global'
649648
art.inputs.parameter_source = 'SPM'
650649

651-
652650
"""Here we are connecting all the nodes together. Notice that we add the merge node only if you choose
653651
to use 4D. Also `get_vox_dims` function is passed along the input volume of normalise to set the optimal
654652
voxel sizes.
@@ -698,7 +696,6 @@ def merge_files(in1, in2):
698696
wf.connect(art, 'norm_files', createfilter1, 'comp_norm')
699697
wf.connect(art, 'outlier_files', createfilter1, 'outliers')
700698

701-
702699
filter1 = MapNode(fsl.GLM(out_f_name='F_mcart.nii',
703700
out_pf_name='pF_mcart.nii',
704701
demean=True),
@@ -710,7 +707,6 @@ def merge_files(in1, in2):
710707
filter1, 'out_res_name')
711708
wf.connect(createfilter1, 'out_files', filter1, 'design')
712709

713-
714710
createfilter2 = MapNode(Function(input_names=['realigned_file', 'mask_file',
715711
'num_components',
716712
'extra_regressors'],
@@ -726,7 +722,6 @@ def merge_files(in1, in2):
726722
wf.connect(registration, ('outputspec.segmentation_files', selectindex, [0, 2]),
727723
createfilter2, 'mask_file')
728724

729-
730725
filter2 = MapNode(fsl.GLM(out_f_name='F.nii',
731726
out_pf_name='pF.nii',
732727
demean=True),

examples/rsfmri_vol_surface_preprocessing_nipy.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ def create_reg_workflow(name='registration'):
508508
register.connect(stripper, 'out_file', reg, 'moving_image')
509509
register.connect(inputnode, 'target_image', reg, 'fixed_image')
510510

511-
512511
"""
513512
Concatenate the affine and ants transforms into a list
514513
"""
@@ -517,7 +516,6 @@ def create_reg_workflow(name='registration'):
517516
register.connect(convert2itk, 'itk_transform', merge, 'in2')
518517
register.connect(reg, 'composite_transform', merge, 'in1')
519518

520-
521519
"""
522520
Transform the mean image. First to anatomical and then to target
523521
"""
@@ -535,7 +533,6 @@ def create_reg_workflow(name='registration'):
535533
register.connect(inputnode, 'mean_image', warpmean, 'input_image')
536534
register.connect(merge, 'out', warpmean, 'transforms')
537535

538-
539536
"""
540537
Assign all the output files
541538
"""
@@ -596,7 +593,6 @@ def create_workflow(files,
596593
realign.inputs.slice_info = 2
597594
realign.plugin_args = {'sbatch_args': '-c%d' % 4}
598595

599-
600596
# Comute TSNR on realigned data regressing polynomials upto order 2
601597
tsnr = MapNode(TSNR(regress_poly=2), iterfield=['in_file'], name='tsnr')
602598
wf.connect(realign, "out_file", tsnr, "in_file")
@@ -640,7 +636,6 @@ def create_workflow(files,
640636
art.inputs.mask_type = 'spm_global'
641637
art.inputs.parameter_source = 'NiPy'
642638

643-
644639
"""Here we are connecting all the nodes together. Notice that we add the merge node only if you choose
645640
to use 4D. Also `get_vox_dims` function is passed along the input volume of normalise to set the optimal
646641
voxel sizes.
@@ -689,7 +684,6 @@ def merge_files(in1, in2):
689684
wf.connect(art, 'norm_files', createfilter1, 'comp_norm')
690685
wf.connect(art, 'outlier_files', createfilter1, 'outliers')
691686

692-
693687
filter1 = MapNode(fsl.GLM(out_f_name='F_mcart.nii.gz',
694688
out_pf_name='pF_mcart.nii.gz',
695689
demean=True),
@@ -701,7 +695,6 @@ def merge_files(in1, in2):
701695
filter1, 'out_res_name')
702696
wf.connect(createfilter1, 'out_files', filter1, 'design')
703697

704-
705698
createfilter2 = MapNode(Function(input_names=['realigned_file', 'mask_file',
706699
'num_components',
707700
'extra_regressors'],
@@ -717,7 +710,6 @@ def merge_files(in1, in2):
717710
wf.connect(registration, ('outputspec.segmentation_files', selectindex, [0, 2]),
718711
createfilter2, 'mask_file')
719712

720-
721713
filter2 = MapNode(fsl.GLM(out_f_name='F.nii.gz',
722714
out_pf_name='pF.nii.gz',
723715
demean=True),

nipype/algorithms/metrics.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ def _run_interface(self, runtime):
412412
img_ref = np.array([nb.load(fname).get_data() for fname in self.inputs.in_ref])
413413
img_tst = np.array([nb.load(fname).get_data() for fname in self.inputs.in_tst])
414414

415-
416415
msk = np.sum(img_ref, axis=0)
417416
msk[msk > 0] = 1.0
418417
tst_msk = np.sum(img_tst, axis=0)
@@ -447,7 +446,6 @@ def _run_interface(self, runtime):
447446
setattr(self, '_jaccard', np.sum(weights * self._jaccards))
448447
setattr(self, '_dice', np.sum(weights * self._dices))
449448

450-
451449
diff = np.zeros(diff_im[0].shape)
452450

453451
for w, ch in zip(weights, diff_im):
@@ -457,7 +455,6 @@ def _run_interface(self, runtime):
457455
nb.save(nb.Nifti1Image(diff, nb.load(self.inputs.in_ref[0]).get_affine(),
458456
nb.load(self.inputs.in_ref[0]).get_header()), self.inputs.out_file)
459457

460-
461458
return runtime
462459

463460
def _list_outputs(self):
@@ -631,7 +628,6 @@ def __init__(self, **inputs):
631628
self._have_nipy = False
632629
super(Similarity, self).__init__(**inputs)
633630

634-
635631
def _run_interface(self, runtime):
636632
if not self._have_nipy:
637633
raise RuntimeError('nipy is not installed')

nipype/algorithms/misc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,6 @@ def normalize_tpms(in_files, in_mask=None, out_files=[]):
12781278

12791279
msk = np.ma.masked_equal(msk, 0)
12801280

1281-
12821281
for i, out_file in enumerate(out_files):
12831282
data = np.ma.masked_equal(img_data[i], 0)
12841283
probmap = data / weights

nipype/algorithms/tests/test_errormap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_errormap():
2626
nib.save(img2, os.path.join(tempdir, 'alan.nii.gz'))
2727
nib.save(maskimg, os.path.join(tempdir, 'mask.nii.gz'))
2828

29-
3029
# Default metric
3130
errmap = ErrorMap()
3231
errmap.inputs.in_tst = os.path.join(tempdir, 'von.nii.gz')

nipype/external/cloghandler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
codecs = None
6666

6767

68-
6968
# Question/TODO: Should we have a fallback mode if we can't load portalocker /
7069
# we should still be better off than with the standard RotattingFileHandler
7170
# class, right? We do some rename checking... that should prevent some file

nipype/external/portalocker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def unlock(file):
124124
fcntl.flock(file.fileno(), fcntl.LOCK_UN)
125125

126126

127-
128127
if __name__ == '__main__':
129128
from time import time, strftime, localtime
130129
import sys

nipype/external/provcopy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ def json_representation(self):
319319
# Assuming it is a valid identifier
320320
return {'$': str(self._value), 'type': self._datatype.get_uri()}
321321

322-
323322
def rdf_representation(self):
324323
if self._langtag:
325324
# a langtag can only goes with string

nipype/external/six.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ def assertRegex(self, *args, **kwargs):
655655
if PY3:
656656
exec_ = getattr(moves.builtins, "exec")
657657

658-
659658
def reraise(tp, value, tb=None):
660659
if value is None:
661660
value = tp()
@@ -676,7 +675,6 @@ def exec_(_code_, _globs_=None, _locs_=None):
676675
_locs_ = _globs_
677676
exec("""exec _code_ in _globs_, _locs_""")
678677

679-
680678
exec_("""def reraise(tp, value, tb=None):
681679
raise tp, value, tb
682680
""")

nipype/fixes/numpy/testing/noseclasses.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen):
9393
self._find(tests, val, valname1, module, source_lines,
9494
globs, seen)
9595

96-
9796
# Look for tests in a class's contained objects.
9897
if isclass(obj) and self._recurse:
9998
# print 'RECURSE into class:',obj # dbg

nipype/interfaces/afni/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class AFNICommand(CommandLine):
111111
input_spec = AFNICommandInputSpec
112112
_outputtype = None
113113

114-
115114
def __init__(self, **inputs):
116115
super(AFNICommand, self).__init__(**inputs)
117116
self.inputs.on_trait_change(self._output_update, 'outputtype')

nipype/interfaces/afni/preprocess.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,6 @@ class TCorr1DInputSpec(AFNICommandInputSpec):
14071407
position=1)
14081408

14091409

1410-
14111410
class TCorr1DOutputSpec(TraitedSpec):
14121411
out_file = File(desc='output file containing correlations',
14131412
exists=True)

nipype/interfaces/ants/registration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ def _formatWinsorizeImageIntensities(self):
670670
self._quantilesDone = True
671671
return '--winsorize-image-intensities [ %s, %s ]' % (self.inputs.winsorize_lower_quantile, self.inputs.winsorize_upper_quantile)
672672

673-
674673
def _format_arg(self, opt, spec, val):
675674
if opt == 'fixed_image_mask':
676675
if isdefined(self.inputs.moving_image_mask):

nipype/interfaces/ants/resampling.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ class ApplyTransformsToPoints(ANTSCommand):
382382
input_spec = ApplyTransformsToPointsInputSpec
383383
output_spec = ApplyTransformsToPointsOutputSpec
384384

385-
386385
def _getTransformFileNames(self):
387386
retval = []
388387
for ii in range(len(self.inputs.transforms)):

nipype/interfaces/camino/calib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ def _gen_outfilename(self):
131131
return name + '_PICOCalib.Bfloat'
132132

133133

134-
135134
class SFLUTGenInputSpec(StdOutCommandLineInputSpec):
136135
in_file = File(exists=True, argstr='-inputfile %s', mandatory=True,
137136
desc='Voxel-order data of the spherical functions peaks.')

nipype/interfaces/camino/odf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def _gen_outfilename(self):
9292
return name + '_qmat.Bdouble'
9393

9494

95-
9695
class LinReconInputSpec(StdOutCommandLineInputSpec):
9796
in_file = File(exists=True, argstr='%s', mandatory=True, position=1,
9897
desc='voxel-order data filename')

nipype/interfaces/dynamic_slicer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class SlicerCommandLine(CommandLine):
2121
input_spec = SlicerCommandLineInputSpec
2222
output_spec = DynamicTraitedSpec
2323

24-
25-
2624
def _grab_xml(self, module):
2725
cmd = CommandLine(command="Slicer3", args="--launch %s --xml" %module)
2826
ret = cmd.run()
@@ -66,7 +64,6 @@ def __init__(self, module, **inputs):
6664
else:
6765
traitsParams["argstr"] = "--" + name + " "
6866

69-
7067
argsDict = {'file': '%s', 'integer': "%d", 'double': "%f", 'float': "%f", 'image': "%s", 'transform': "%s", 'boolean': '', 'string-enumeration': '%s', 'string': "%s"}
7168

7269
if param.nodeName.endswith('-vector'):
@@ -117,7 +114,6 @@ def __init__(self, module, **inputs):
117114
_ = getattr(self.inputs, name)
118115
# self._outputs().trait_set(trait_change_notify=False, **undefined_output_traits)
119116

120-
121117
def _gen_filename(self, name):
122118
if name in self._outputs_filenames:
123119
return os.path.join(os.getcwd(), self._outputs_filenames[name])

0 commit comments

Comments
 (0)