summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/fix_default_axis.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-08-18 11:51:25 -0600
commitfbd6510d58a47ea0d166c48a82793f05425406e4 (patch)
tree330ce703eb02d20f96099c3fe0fc36ae33d4905b /numpy/oldnumeric/fix_default_axis.py
parent8ddb0ce0acafe75d78df528b4d2540dfbf4b364d (diff)
downloadnumpy-fbd6510d58a47ea0d166c48a82793f05425406e4.tar.gz
STY: Giant comma spacing fixup.
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
Diffstat (limited to 'numpy/oldnumeric/fix_default_axis.py')
-rw-r--r--numpy/oldnumeric/fix_default_axis.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/oldnumeric/fix_default_axis.py b/numpy/oldnumeric/fix_default_axis.py
index 5f6128724..d4235a94c 100644
--- a/numpy/oldnumeric/fix_default_axis.py
+++ b/numpy/oldnumeric/fix_default_axis.py
@@ -82,9 +82,9 @@ def _add_axis(fstr, name, repl):
and fstr[start-8:start-1] != 'numerix' \
and fstr[start-8:start-1] != 'Numeric':
continue
- if fstr[start-1] in ['\t',' ']:
+ if fstr[start-1] in ['\t', ' ']:
k = start-2
- while fstr[k] in ['\t',' ']:
+ while fstr[k] in ['\t', ' ']:
k -= 1
if fstr[k-2:k+1] == 'def' or \
fstr[k-4:k+1] == 'class':
@@ -200,8 +200,8 @@ def _import_change(fstr, names):
ptr += 1
substr = fstr[ind:ptr]
found = 0
- substr = substr.replace('\n',' ')
- substr = substr.replace('\\','')
+ substr = substr.replace('\n', ' ')
+ substr = substr.replace('\\', '')
importnames = [x.strip() for x in substr.split(',')]
# determine if any of names are in importnames
addnames = []
@@ -277,7 +277,7 @@ def convertall(direc=os.path.curdir, import_change=False):
<usesnumeric>.py.orig. A new file named <usesnumeric>.py
is then written with the updated code.
"""
- files = glob.glob(os.path.join(direc,'*.py'))
+ files = glob.glob(os.path.join(direc, '*.py'))
for afile in files:
convertfile(afile, import_change)