Ruff automatic fixes and formatting.

This commit is contained in:
2026-05-25 01:57:17 +00:00
parent 5f69b5365f
commit 0e5251ab91
24 changed files with 417 additions and 448 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ REPO_ROOT = Path(__file__).parent.parent
def load_gitea_config() -> dict:
pyproject = REPO_ROOT / "pyproject.toml"
with open(pyproject, "rb") as f:
with Path(pyproject).open("rb") as f:
data = tomllib.load(f)
repo_url = data.get("project", {}).get("urls", {}).get("Repository")
if not repo_url:
@@ -156,7 +156,7 @@ def upload_asset(
size_mb = path.stat().st_size / (1024 * 1024)
mime = "application/zip" if path.suffix == ".zip" else "application/octet-stream"
print(f"Uploading {path.name} ({size_mb:.1f} MB) ...")
with open(path, "rb") as fh:
with Path(path).open("rb") as fh:
resp = client.post(
url,
files={"attachment": (path.name, fh, mime)},