lint: ruff format + one auto-fix so the push self-test is green again
continuous-integration/drone/push Build is failing

`scripts/lint.sh --fix` from the pinned lint devshell: 90 Python files
reformatted (ruff format, mechanical) and one C420 (dict comprehension →
dict.fromkeys) in tests/unit/test_f211_sso_skip.py. The push self-test had
been failing at the lint stage since build 1313 (2026-08-31) on exactly
these files; nothing else changed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqkQq3CDmFWcQ7u1LzoyRz
This commit is contained in:
2026-09-07 21:15:05 +00:00
co-authored by Claude Fable 5.1
parent 769fd29dcf
commit 9a80002b37
91 changed files with 393 additions and 386 deletions
+12 -12
View File
@@ -145,9 +145,9 @@ def test_lfs_roundtrip(live_app):
text=True,
env={**os.environ, **git_env},
)
assert (
"testblob.bin" in lfs_ls.stdout
), f"testblob.bin not in git-lfs ls-files: {lfs_ls.stdout}"
assert "testblob.bin" in lfs_ls.stdout, (
f"testblob.bin not in git-lfs ls-files: {lfs_ls.stdout}"
)
# 6. Download in a FRESH clone (proves the LFS server stores and serves the object)
fresh_dir = tempfile.mkdtemp(prefix="ccci-gitea-lfs-dl-")
@@ -158,9 +158,9 @@ def test_lfs_roundtrip(live_app):
with open(fetched_path, "rb") as f:
fetched = f.read()
fetched_sha256 = hashlib.sha256(fetched).hexdigest()
assert (
fetched_sha256 == expected_sha256
), f"LFS round-trip OID mismatch: expected {expected_oid}, got sha256:{fetched_sha256}"
assert fetched_sha256 == expected_sha256, (
f"LFS round-trip OID mismatch: expected {expected_oid}, got sha256:{fetched_sha256}"
)
finally:
shutil.rmtree(fresh_dir, ignore_errors=True)
@@ -171,9 +171,9 @@ def test_lfs_roundtrip(live_app):
["sh", "-c", "grep -E '^LFS_JWT_SECRET' /etc/gitea/app.ini || echo NOT_FOUND"],
timeout=30,
).strip()
assert (
current_jwt and "NOT_FOUND" not in current_jwt
), "Could not read LFS_JWT_SECRET from /etc/gitea/app.ini before restart"
assert current_jwt and "NOT_FOUND" not in current_jwt, (
"Could not read LFS_JWT_SECRET from /etc/gitea/app.ini before restart"
)
# Restart the gitea container
lifecycle.exec_in_app(live_app, ["true"], timeout=5) # no-op to confirm exec works
@@ -213,9 +213,9 @@ def test_lfs_roundtrip(live_app):
assert os.path.exists(pr_blob), "testblob.bin not fetched in post-restart clone"
with open(pr_blob, "rb") as f:
pr_data = f.read()
assert (
hashlib.sha256(pr_data).hexdigest() == expected_sha256
), "LFS object corrupted after restart — JWT secret may have changed"
assert hashlib.sha256(pr_data).hexdigest() == expected_sha256, (
"LFS object corrupted after restart — JWT secret may have changed"
)
finally:
shutil.rmtree(post_restart_dir, ignore_errors=True)