[ci] Enable the ruff rule requiring explicit encoding on text file I/O (#17897)

This commit is contained in:
J. Nick Koston
2026-07-29 13:44:39 -04:00
committed by GitHub
parent 306d200b02
commit ca1f89e500
11 changed files with 23 additions and 14 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ def _read_codspeed_version(cmake_path: Path) -> str:
"""Extract CODSPEED_VERSION from core/CMakeLists.txt."""
if not cmake_path.exists():
return "0.0.0"
for line in cmake_path.read_text().splitlines():
for line in cmake_path.read_text(encoding="utf-8").splitlines():
if line.startswith("set(CODSPEED_VERSION"):
return line.split()[1].rstrip(")")
return "0.0.0"