mirror of
https://github.com/esphome/esphome.git
synced 2026-08-26 16:10:29 +00:00
[ci] Enable the ruff rule requiring explicit encoding on text file I/O (#17897)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user