diff contrib/import-checker.py @ 52675:b95b12cb31e2

pyupgrade: replace `io.open()` with `open()` This was rewritten by the `io_open` fixer in `pyupgrade`.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 01:27:42 -0500
parents e627cc25b6f3
children 3e84e001b6c1
line wrap: on
line diff
--- a/contrib/import-checker.py	Mon Jan 06 01:20:01 2025 -0500
+++ b/contrib/import-checker.py	Mon Jan 06 01:27:42 2025 -0500
@@ -3,7 +3,6 @@
 
 import ast
 import collections
-import io
 import os
 import sys
 
@@ -705,7 +704,7 @@
         # Python source file encoding. But in reality we don't use anything
         # other than ASCII (mainly) and UTF-8 (in a few exceptions), so
         # simplicity is fine.
-        with io.open(f, 'r', encoding='utf-8') as src:
+        with open(f, 'r', encoding='utf-8') as src:
             for script, modname, t, line in embedded(f, modname, src):
                 yield script, modname.encode('utf8'), t, line