mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
tools: check-imports using utf-8
PR-URL: https://github.com/nodejs/node/pull/30220 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
1f2fdc9538
commit
aa4e54e523
1 file changed
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
import glob
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
|
||||
@@ -15,7 +16,7 @@ def do_exist(file_name, lines, imported):
|
||||
|
||||
|
||||
def is_valid(file_name):
|
||||
with open(file_name) as source_file:
|
||||
with io.open(file_name, encoding='utf-8') as source_file:
|
||||
lines = [line.strip() for line in source_file]
|
||||
|
||||
usings, importeds, line_numbers, valid = [], [], [], True
|
||||
|
||||
Reference in new issue
Block a user