Skip to content

Commit a79f91d

Browse files
committed
FIX: PEP8 - E302 expected 2 blank lines, found 1
1 parent eb464cd commit a79f91d

File tree

145 files changed

+714
-1
lines changed

Some content is hidden

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

145 files changed

+714
-1
lines changed

build_docs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
################################################################################
3131
# Distutils Command class for installing nipype to a temporary location.
32+
33+
3234
class TempInstall(Command):
3335
temp_install_dir = os.path.join('build', 'install')
3436

@@ -166,6 +168,8 @@ def finalize_options(self):
166168

167169
################################################################################
168170
# Distutils Command class to clean
171+
172+
169173
class Clean(clean):
170174

171175
def run(self):

doc/sphinxext/autosummary_generate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
except ImportError:
2727
import_phantom_module = lambda x: x
2828

29+
2930
def main():
3031
p = optparse.OptionParser(__doc__.strip())
3132
p.add_option("-p", "--phantom", action="store", type="string",
@@ -95,16 +96,19 @@ def main():
9596
finally:
9697
f.close()
9798

99+
98100
def format_modulemember(name, directive):
99101
parts = name.split('.')
100102
mod, name = '.'.join(parts[:-1]), parts[-1]
101103
return ".. currentmodule:: %s\n\n.. %s:: %s\n" % (mod, directive, name)
102104

105+
103106
def format_classmember(name, directive):
104107
parts = name.split('.')
105108
mod, name = '.'.join(parts[:-2]), '.'.join(parts[-2:])
106109
return ".. currentmodule:: %s\n\n.. %s:: %s\n" % (mod, directive, name)
107110

111+
108112
def get_documented(filenames):
109113
"""
110114
Find out what items are documented in source/*.rst
@@ -119,6 +123,7 @@ def get_documented(filenames):
119123
f.close()
120124
return documented
121125

126+
122127
def get_documented_in_docstring(name, module=None, filename=None):
123128
"""
124129
Find out what items are documented in the given object's docstring.
@@ -135,6 +140,7 @@ def get_documented_in_docstring(name, module=None, filename=None):
135140
print("Failed to import '%s': %s" % (name, e))
136141
return {}
137142

143+
138144
def get_documented_in_lines(lines, module=None, filename=None):
139145
"""
140146
Find out what items are documented in the given lines

doc/sphinxext/ipython_console_highlighting.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
# -----------------------------------------------------------------------------
2626
# Code begins - classes and functions
2727

28+
2829
class IPythonConsoleLexer(Lexer):
2930
"""
3031
For IPython console output or doctests, such as:

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,12 @@ def indent(str, indent=4):
411411
lines = str.split('\n')
412412
return '\n'.join(indent_str + l for l in lines)
413413

414+
414415
def dedent_lines(lines):
415416
"""Deindent a list of lines maximally"""
416417
return textwrap.dedent("\n".join(lines)).split("\n")
417418

419+
418420
def header(text, style='-'):
419421
return text + '\n' + style*len(text) + '\n'
420422

doc/sphinxext/numpy_ext/docscrape_sphinx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,25 @@ def __str__(self, indent=0, func_role="obj"):
195195
out = self._str_indent(out, indent)
196196
return '\n'.join(out)
197197

198+
198199
class SphinxFunctionDoc(SphinxDocString, FunctionDoc):
199200
def __init__(self, obj, doc=None, config={}):
200201
self.use_plots = config.get('use_plots', False)
201202
FunctionDoc.__init__(self, obj, doc=doc, config=config)
202203

204+
203205
class SphinxClassDoc(SphinxDocString, ClassDoc):
204206
def __init__(self, obj, doc=None, func_doc=None, config={}):
205207
self.use_plots = config.get('use_plots', False)
206208
ClassDoc.__init__(self, obj, doc=doc, func_doc=None, config=config)
207209

210+
208211
class SphinxObjDoc(SphinxDocString):
209212
def __init__(self, obj, doc=None, config={}):
210213
self._f = obj
211214
SphinxDocString.__init__(self, doc, config=config)
212215

216+
213217
def get_doc_object(obj, what=None, doc=None, config={}):
214218
if what is None:
215219
if inspect.isclass(obj):

doc/sphinxext/numpy_ext/numpydoc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from sphinx.util.compat import Directive
3030
import inspect
3131

32+
3233
def mangle_docstrings(app, what, name, obj, options, lines,
3334
reference_offset=[0]):
3435

@@ -78,6 +79,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
7879

7980
reference_offset[0] += len(references)
8081

82+
8183
def mangle_signature(app, what, name, obj, options, sig, retann):
8284
# Do not try to inspect classes that don't define `__init__`
8385
if (inspect.isclass(obj) and
@@ -93,6 +95,7 @@ def mangle_signature(app, what, name, obj, options, sig, retann):
9395
sig = re.sub(u"^[^(]*", u"", doc['Signature'])
9496
return sig, u''
9597

98+
9699
def setup(app, get_doc_object_=get_doc_object):
97100
global get_doc_object
98101
get_doc_object = get_doc_object_
@@ -115,6 +118,7 @@ def setup(app, get_doc_object_=get_doc_object):
115118
from sphinx.domains.c import CDomain
116119
from sphinx.domains.python import PythonDomain
117120

121+
118122
class ManglingDomainBase(object):
119123
directive_mangling_map = {}
120124

@@ -127,6 +131,7 @@ def wrap_mangling_directives(self):
127131
self.directives[name] = wrap_mangling_directive(
128132
self.directives[name], objtype)
129133

134+
130135
class NumpyPythonDomain(ManglingDomainBase, PythonDomain):
131136
name = 'np'
132137
directive_mangling_map = {
@@ -139,6 +144,7 @@ class NumpyPythonDomain(ManglingDomainBase, PythonDomain):
139144
'attribute': 'attribute',
140145
}
141146

147+
142148
class NumpyCDomain(ManglingDomainBase, CDomain):
143149
name = 'np-c'
144150
directive_mangling_map = {
@@ -149,6 +155,7 @@ class NumpyCDomain(ManglingDomainBase, CDomain):
149155
'var': 'object',
150156
}
151157

158+
152159
def wrap_mangling_directive(base_directive, objtype):
153160
class directive(base_directive):
154161
def run(self):

examples/dmri_camino_dti.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
(fmri_spm_face.py) also implements this inferral of voxel size from the data.
3434
"""
3535

36+
3637
def get_vox_dims(volume):
3738
import nibabel as nb
3839
if isinstance(volume, list):
@@ -42,6 +43,7 @@ def get_vox_dims(volume):
4243
voxdims = hdr.get_zooms()
4344
return [float(voxdims[0]), float(voxdims[1]), float(voxdims[2])]
4445

46+
4547
def get_data_dims(volume):
4648
import nibabel as nb
4749
if isinstance(volume, list):
@@ -51,6 +53,7 @@ def get_data_dims(volume):
5153
datadims = hdr.get_data_shape()
5254
return [int(datadims[0]), int(datadims[1]), int(datadims[2])]
5355

56+
5457
def get_affine(volume):
5558
import nibabel as nb
5659
nii = nb.load(volume)

examples/dmri_connectivity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
regions.
7272
"""
7373

74+
7475
def get_vox_dims(volume):
7576
import nibabel as nb
7677
if isinstance(volume, list):
@@ -80,6 +81,7 @@ def get_vox_dims(volume):
8081
voxdims = hdr.get_zooms()
8182
return [float(voxdims[0]), float(voxdims[1]), float(voxdims[2])]
8283

84+
8385
def get_data_dims(volume):
8486
import nibabel as nb
8587
if isinstance(volume, list):
@@ -89,17 +91,20 @@ def get_data_dims(volume):
8991
datadims = hdr.get_data_shape()
9092
return [int(datadims[0]), int(datadims[1]), int(datadims[2])]
9193

94+
9295
def get_affine(volume):
9396
import nibabel as nb
9497
nii = nb.load(volume)
9598
return nii.get_affine()
9699

100+
97101
def select_aparc(list_of_files):
98102
for in_file in list_of_files:
99103
if 'aparc+aseg.mgz' in in_file:
100104
idx = list_of_files.index(in_file)
101105
return list_of_files[idx]
102106

107+
103108
def select_aparc_annot(list_of_files):
104109
for in_file in list_of_files:
105110
if '.aparc.annot' in in_file:

examples/dmri_dtk_dti.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
datasink = pe.Node(interface=nio.DataSink(), name='datasink')
190190
datasink.inputs.base_directory = os.path.abspath('dtiresults')
191191

192+
192193
def getstripdir(subject_id):
193194
return os.path.join(os.path.abspath('data/workingdir/dwiproc'), '_subject_id_%s' % subject_id)
194195

examples/dmri_fsl_dti.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
datasink = pe.Node(interface=nio.DataSink(), name='datasink')
240240
datasink.inputs.base_directory = os.path.abspath('dtiresults')
241241

242+
242243
def getstripdir(subject_id):
243244
import os
244245
return os.path.join(os.path.abspath('data/workingdir/dwiproc'), '_subject_id_%s' % subject_id)

0 commit comments

Comments
 (0)