summaryrefslogtreecommitdiff
path: root/numpy/distutils/misc_util.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/misc_util.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/misc_util.py')
-rw-r--r--numpy/distutils/misc_util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index 79ba08515..e226b4744 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -475,7 +475,7 @@ def _get_f90_modules(source):
if not f90_ext_match(source):
return []
modules = []
- with open(source, 'r') as f:
+ with open(source) as f:
for line in f:
m = f90_module_name_match(line)
if m:
@@ -1932,7 +1932,7 @@ class Configuration:
revision0 = f.read().strip()
branch_map = {}
- with open(branch_cache_fn, 'r') as f:
+ with open(branch_cache_fn) as f:
for line in f:
branch1, revision1 = line.split()[:2]
if revision1==revision0: