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 /doc/postprocess.py | |
parent | a8ebbd5fdb9df3d1d2885b24e783757d747dec8e (diff) | |
download | numpy-080cf82ebc5858ec47eff0d49bdf48b74f955274.tar.gz |
MAINT: remove redundant open() modes and io.open() alias
Diffstat (limited to 'doc/postprocess.py')
-rwxr-xr-x | doc/postprocess.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/postprocess.py b/doc/postprocess.py index 3e066d22e..4b48fa443 100755 --- a/doc/postprocess.py +++ b/doc/postprocess.py @@ -2,7 +2,7 @@ """ Post-processes HTML and Latex files output by Sphinx. """ -import io + def main(): import argparse @@ -15,13 +15,13 @@ def main(): mode = args.mode for fn in args.file: - with io.open(fn, 'r', encoding="utf-8") as f: + with open(fn, encoding="utf-8") as f: if mode == 'html': lines = process_html(fn, f.readlines()) elif mode == 'tex': lines = process_tex(f.readlines()) - with io.open(fn, 'w', encoding="utf-8") as f: + with open(fn, 'w', encoding="utf-8") as f: f.write("".join(lines)) def process_html(fn, lines): |