summaryrefslogtreecommitdiff
path: root/tools/cythonize.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cythonize.py')
-rwxr-xr-xtools/cythonize.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/cythonize.py b/tools/cythonize.py
index 311a52c91..d66ddb98c 100755
--- a/tools/cythonize.py
+++ b/tools/cythonize.py
@@ -52,7 +52,7 @@ def process_tempita_pyx(fromfile, tofile):
import npy_tempita as tempita
assert fromfile.endswith('.pyx.in')
- with open(fromfile, "r") as f:
+ with open(fromfile) as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)
pyxfile = fromfile[:-len('.pyx.in')] + '.pyx'
@@ -66,7 +66,7 @@ def process_tempita_pyd(fromfile, tofile):
assert fromfile.endswith('.pxd.in')
assert tofile.endswith('.pxd')
- with open(fromfile, "r") as f:
+ with open(fromfile) as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)
with open(tofile, "w") as f:
@@ -77,7 +77,7 @@ def process_tempita_pxi(fromfile, tofile):
assert fromfile.endswith('.pxi.in')
assert tofile.endswith('.pxi')
- with open(fromfile, "r") as f:
+ with open(fromfile) as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)
with open(tofile, "w") as f:
@@ -88,7 +88,7 @@ def process_tempita_pxd(fromfile, tofile):
assert fromfile.endswith('.pxd.in')
assert tofile.endswith('.pxd')
- with open(fromfile, "r") as f:
+ with open(fromfile) as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)
with open(tofile, "w") as f:
@@ -109,7 +109,7 @@ def load_hashes(filename):
# Return { filename : (sha256 of input, sha256 of output) }
if os.path.isfile(filename):
hashes = {}
- with open(filename, 'r') as f:
+ with open(filename) as f:
for line in f:
filename, inhash, outhash = line.split()
hashes[filename] = (inhash, outhash)