fix: suppress windows-footgun false positive on binary tomllib open

This commit is contained in:
Teknium 2026-08-06 17:30:33 -07:00
parent 9eaaa59dec
commit 4db8588395
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -734,7 +734,7 @@ def _read_project_version() -> str | None:
try:
import tomllib
with open(_m().PROJECT_ROOT / "pyproject.toml", "rb") as fh:
with open(_m().PROJECT_ROOT / "pyproject.toml", "rb") as fh: # windows-footgun: ok — binary mode, tomllib requires bytes
version = tomllib.load(fh).get("project", {}).get("version")
return str(version) if version else None
except Exception: