projects/aports·blob master · refs

21 lines · 951 B

1diff -rupN a/cpplint.py b/cpplint.py
2--- a/cpplint.py 2025-04-08 01:16:55.000000000 +0000
3+++ b/cpplint.py 2026-04-01 01:08:06.670000000 +0000
4@@ -7448,7 +7448,7 @@ def ProcessConfigOverrides(filename):
5 continue
6
7 try:
8- with codecs.open(cfg_file, "r", "utf8", "replace") as file_handle:
9+ with open(cfg_file, "r", encoding="utf-8") as file_handle:
10 for line in file_handle:
11 line, _, _ = line.partition("#") # Remove comments.
12 if not line.strip():
13@@ -7550,7 +7550,7 @@ def ProcessFile(filename, vlevel, extra_
14 if filename == "-":
15 lines = sys.stdin.read().split("\n")
16 else:
17- with codecs.open(filename, "r", "utf8", "replace") as target_file:
18+ with open(filename, "r", encoding="utf-8") as target_file:
19 lines = target_file.read().split("\n")
20
21 # Remove trailing '\r'.