Meta: Open files with explicit encoding in check-style.py

This commit is contained in:
Andrew Kaster 2025-02-05 17:32:10 -07:00 committed by Andrew Kaster
parent adfb371e4f
commit c7fe7b09a5
Notes: github-actions[bot] 2025-02-06 00:36:12 +00:00

View file

@ -99,7 +99,7 @@ def run():
errors_single_page_html_spec = []
for filename in find_files_here_or_argv():
with open(filename, "r") as f:
with open(filename, mode="r", encoding='utf-8') as f:
file_content = f.read()
if not is_in_prefix_list(filename, LICENSE_HEADER_CHECK_EXCLUDES):
if not GOOD_LICENSE_HEADER_PATTERN.search(file_content):