lint: ruff format + one auto-fix so the push self-test is green again
continuous-integration/drone/push Build is failing
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:
@@ -174,10 +174,17 @@ def test_level_badge_shows_level_coloured(monkeypatch):
|
||||
def _write_run(base, run_id, recipe, finished, **kw):
|
||||
d = os.path.join(base, run_id)
|
||||
os.makedirs(d, exist_ok=True)
|
||||
doc = {"recipe": recipe, "finished": finished, "run_id": run_id,
|
||||
"ref": kw.get("ref", "deadbeefcafe"), "version": kw.get("version"),
|
||||
"level": kw.get("level", 5), "screenshot": kw.get("screenshot", "screenshot.png"),
|
||||
"results": kw.get("results", {"install": "pass"}), "flags": kw.get("flags", {})}
|
||||
doc = {
|
||||
"recipe": recipe,
|
||||
"finished": finished,
|
||||
"run_id": run_id,
|
||||
"ref": kw.get("ref", "deadbeefcafe"),
|
||||
"version": kw.get("version"),
|
||||
"level": kw.get("level", 5),
|
||||
"screenshot": kw.get("screenshot", "screenshot.png"),
|
||||
"results": kw.get("results", {"install": "pass"}),
|
||||
"flags": kw.get("flags", {}),
|
||||
}
|
||||
with open(os.path.join(d, "results.json"), "w") as fh:
|
||||
json.dump(doc, fh)
|
||||
|
||||
@@ -193,8 +200,12 @@ def test_history_sourced_from_local_artifacts(tmp_path, monkeypatch):
|
||||
# mixed numeric + named ids; out-of-order on disk; the timestamp MUST decide order, not the id
|
||||
_write_run(base, "753", "bsky", 1781663348, results={"install": "pass"})
|
||||
_write_run(base, "427", "bsky", 1781178768, results={"install": "pass"})
|
||||
_write_run(base, "m2r-bsky", "bsky", 1781121610, level=0, results={"install": "pass", "backup": "fail"})
|
||||
_write_run(base, "423", "bsky", 1781178063, results={"install": "pass"}) # 423<427 numerically but OLDER
|
||||
_write_run(
|
||||
base, "m2r-bsky", "bsky", 1781121610, level=0, results={"install": "pass", "backup": "fail"}
|
||||
)
|
||||
_write_run(
|
||||
base, "423", "bsky", 1781178063, results={"install": "pass"}
|
||||
) # 423<427 numerically but OLDER
|
||||
_write_run(base, "9", "other", 1781000000) # different recipe, must not leak in
|
||||
# graceful-skip cases (the host's in-flight/failed-early dirs)
|
||||
os.makedirs(os.path.join(base, "EMPTY"), exist_ok=True) # in-flight dir, no results.json
|
||||
|
||||
@@ -66,7 +66,7 @@ def _load_conftest():
|
||||
class _FakeItem:
|
||||
def __init__(self, keywords):
|
||||
# pytest `item.keywords` supports `in`; a dict suffices.
|
||||
self.keywords = {k: True for k in keywords}
|
||||
self.keywords = dict.fromkeys(keywords, True)
|
||||
self.markers = []
|
||||
|
||||
def add_marker(self, mark):
|
||||
|
||||
@@ -176,6 +176,5 @@ def test_scm_redirect_assertions(location_url, gitea_domain, client_id, expect_p
|
||||
]
|
||||
all_pass = all(checks)
|
||||
assert all_pass == expect_pass, (
|
||||
f"Expected {'pass' if expect_pass else 'fail'} for URL {location_url!r}; "
|
||||
f"checks: {checks}"
|
||||
f"Expected {'pass' if expect_pass else 'fail'} for URL {location_url!r}; checks: {checks}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user