Skip to content

Commit 1034f30

Browse files
committed
FIX: PEP8 - E701 multiple statements on one line (colon)
1 parent faa13a5 commit 1034f30

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

doc/sphinxext/numpy_ext/docscrape.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ def _strip(self, doc):
145145
i = 0
146146
j = 0
147147
for i, line in enumerate(doc):
148-
if line.strip(): break
148+
if line.strip():
149+
break
149150

150151
for j, line in enumerate(doc[::-1]):
151-
if line.strip(): break
152+
if line.strip():
153+
break
152154

153155
return doc[i:len(doc)-j]
154156

@@ -227,7 +229,8 @@ def push_item(name, rest):
227229
rest = []
228230

229231
for line in content:
230-
if not line.strip(): continue
232+
if not line.strip():
233+
continue
231234

232235
m = self._name_rgx.match(line)
233236
if m and line[m.end():].strip().startswith(':'):
@@ -351,7 +354,8 @@ def _str_section(self, name):
351354
return out
352355

353356
def _str_see_also(self, func_role):
354-
if not self['See Also']: return []
357+
if not self['See Also']:
358+
return []
355359
out = []
356360
out += self._str_header("See Also")
357361
last_had_desc = True

doc/sphinxext/numpy_ext/numpydoc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ def mangle_signature(app, what, name, obj, options, sig, retann):
8989
'initializes x; see ' in pydoc.getdoc(obj.__init__))):
9090
return '', ''
9191

92-
if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
93-
if not hasattr(obj, '__doc__'): return
92+
if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')):
93+
return
94+
if not hasattr(obj, '__doc__'):
95+
return
9496

9597
doc = SphinxDocString(pydoc.getdoc(obj))
9698
if doc['Signature']:

nipype/algorithms/modelgen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def gcd(a, b):
5050
11
5151
5252
"""
53-
while b > 0: a, b = b, a % b
53+
while b > 0:
54+
a, b = b, a % b
5455
return a
5556

5657

nipype/pipeline/engine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False,
10651065
colored=colored,
10661066
simple_form=simple_form, level=level+3))
10671067
dotlist.append('}')
1068-
if level == 6: level = 2
1068+
if level == 6:
1069+
level = 2
10691070
else:
10701071
for subnode in self._graph.successors_iter(node):
10711072
if node._hierarchy != subnode._hierarchy:

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
2222
# update it when the contents of directories change.
23-
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
23+
if os.path.exists('MANIFEST'):
24+
os.remove('MANIFEST')
2425

2526
# For some commands, use setuptools.
2627
if len(set(('develop', 'bdist_egg', 'bdist_rpm', 'bdist', 'bdist_dumb',

0 commit comments

Comments
 (0)