diff options
author | Mike Taves <mwtoews@gmail.com> | 2022-10-28 22:37:29 +1300 |
---|---|---|
committer | Mike Taves <mwtoews@gmail.com> | 2022-10-29 14:08:54 +1300 |
commit | 080cf82ebc5858ec47eff0d49bdf48b74f955274 (patch) | |
tree | c843b284d9994186ab988c7c535a895433ae9905 /runtests.py | |
parent | a8ebbd5fdb9df3d1d2885b24e783757d747dec8e (diff) | |
download | numpy-080cf82ebc5858ec47eff0d49bdf48b74f955274.tar.gz |
MAINT: remove redundant open() modes and io.open() alias
Diffstat (limited to 'runtests.py')
-rwxr-xr-x | runtests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtests.py b/runtests.py index fea29a10d..5bdb6cf22 100755 --- a/runtests.py +++ b/runtests.py @@ -220,7 +220,7 @@ def main(argv): # Don't use subprocess, since we don't want to include the # current path in PYTHONPATH. sys.argv = extra_argv - with open(extra_argv[0], 'r') as f: + with open(extra_argv[0]) as f: script = f.read() sys.modules['__main__'] = types.ModuleType('__main__') ns = dict(__name__='__main__', @@ -540,7 +540,7 @@ def build_project(args): print("Build OK") else: if not args.show_build_log: - with open(log_filename, 'r') as f: + with open(log_filename) as f: print(f.read()) print("Build failed!") sys.exit(1) @@ -624,7 +624,7 @@ def asv_substitute_config(in_config, out_config, **custom_vars): vars_hash = sdbm_hash(custom_vars, os.path.getmtime(in_config)) try: - with open(out_config, "r") as wfd: + with open(out_config) as wfd: hash_line = wfd.readline().split('hash:') if len(hash_line) > 1 and int(hash_line[1]) == vars_hash: return True |