summaryrefslogtreecommitdiff
path: root/doc/postprocess.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2023-05-13 11:02:49 -0600
committerGitHub <noreply@github.com>2023-05-13 11:02:49 -0600
commit5187067d7ad176ee3614beab2b99a524dd719aa8 (patch)
tree907997d0c294f550193322aaa73237c1a7bcfaa6 /doc/postprocess.py
parentb786189222ac5bf2f4efbb04399261f7f760bc18 (diff)
parent81caed6e3c34c4bf4b22b4f6167e816ba2a3f73c (diff)
downloadnumpy-5187067d7ad176ee3614beab2b99a524dd719aa8.tar.gz
Merge branch 'main' into deprecate-find-common-type
Diffstat (limited to 'doc/postprocess.py')
-rwxr-xr-xdoc/postprocess.py6
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):