summaryrefslogtreecommitdiff
path: root/numpy/distutils/system_info.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2023-04-28 10:04:53 +0200
committerGitHub <noreply@github.com>2023-04-28 10:04:53 +0200
commit1c9532bb8857551d163517bf0028441c7cd544c8 (patch)
tree328461db08a78ff0db667e7135dd9d8e2f2e1ff5 /numpy/distutils/system_info.py
parent7fe3ffadbbe9114cbc561c27d7a6d285f84fc129 (diff)
parent080cf82ebc5858ec47eff0d49bdf48b74f955274 (diff)
downloadnumpy-1c9532bb8857551d163517bf0028441c7cd544c8.tar.gz
Merge pull request #22493 from mwtoews/maint-open
MAINT: remove redundant open() modes and io.open() alias
Diffstat (limited to 'numpy/distutils/system_info.py')
-rw-r--r--numpy/distutils/system_info.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 434554915..3dca7fb5a 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -1266,7 +1266,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:
@@ -2267,7 +2267,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:
@@ -2422,7 +2422,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:
@@ -2533,7 +2533,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: