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 /numpy/distutils/command/build_src.py | |
parent | a8ebbd5fdb9df3d1d2885b24e783757d747dec8e (diff) | |
download | numpy-080cf82ebc5858ec47eff0d49bdf48b74f955274.tar.gz |
MAINT: remove redundant open() modes and io.open() alias
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index 5581011f6..bf3d03c70 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -725,7 +725,7 @@ _has_c_header = re.compile(r'-\*-\s*c\s*-\*-', re.I).search _has_cpp_header = re.compile(r'-\*-\s*c\+\+\s*-\*-', re.I).search def get_swig_target(source): - with open(source, 'r') as f: + with open(source) as f: result = None line = f.readline() if _has_cpp_header(line): @@ -735,7 +735,7 @@ def get_swig_target(source): return result def get_swig_modulename(source): - with open(source, 'r') as f: + with open(source) as f: name = None for line in f: m = _swig_module_name_match(line) |