Skip to content

Commit 051e27b

Browse files
cclausstargos
authored andcommitted
tools: check-imports using utf-8
PR-URL: #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>
1 parent a219946 commit 051e27b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tools/check-imports.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ importprint_function
44
importglob
5+
importio
56
importre
67
importsys
78

@@ -15,7 +16,7 @@ def do_exist(file_name, lines, imported):
1516

1617

1718
defis_valid(file_name):
18-
withopen(file_name) assource_file:
19+
withio.open(file_name, encoding='utf-8') assource_file:
1920
lines= [line.strip() forlineinsource_file]
2021

2122
usings, importeds, line_numbers, valid= [], [], [], True

0 commit comments

Comments
 (0)