From 080cf82ebc5858ec47eff0d49bdf48b74f955274 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Fri, 28 Oct 2022 22:37:29 +1300 Subject: MAINT: remove redundant open() modes and io.open() alias --- numpy/distutils/system_info.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy/distutils/system_info.py') diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index d5a1687da..5a87c080d 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -1260,7 +1260,7 @@ class mkl_info(system_info): paths = os.environ.get('LD_LIBRARY_PATH', '').split(os.pathsep) ld_so_conf = '/etc/ld.so.conf' if os.path.isfile(ld_so_conf): - with open(ld_so_conf, 'r') as f: + with open(ld_so_conf) as f: for d in f: d = d.strip() if d: @@ -2190,7 +2190,7 @@ class blas_info(system_info): }""") src = os.path.join(tmpdir, 'source.c') try: - with open(src, 'wt') as f: + with open(src, 'w') as f: f.write(s) try: @@ -2345,7 +2345,7 @@ class openblas_info(blas_info): except Exception: extra_args = [] try: - with open(src, 'wt') as f: + with open(src, 'w') as f: f.write(s) obj = c.compile([src], output_dir=tmpdir) try: @@ -2456,7 +2456,7 @@ class flame_info(system_info): # Add the additional "extra" arguments extra_args = info.get('extra_link_args', []) try: - with open(src, 'wt') as f: + with open(src, 'w') as f: f.write(s) obj = c.compile([src], output_dir=tmpdir) try: -- cgit v1.2.1