Skip to content

Commit 0e07748

Browse files
ci: pin ruff and fix lint so master validates again
CI installed an unpinned ruff, so a new ruff release (UP017, B905) has failed every master and PR run since 2026-09-16. Pin ruff in the dev lock (upgrades now arrive via dependabot) and fix the three findings without changing behavior. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent c0b14df commit 0e07748

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎.github/workflows/validate.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install dependencies and dev tools
3737
run: |
3838
uv venv --python ${{ matrix.python-version }}
39-
uv pip install -r requirements-dev.lock.txt ruff
39+
uv pip install -r requirements-dev.lock.txt
4040
4141
- name: Lint with ruff
4242
run: .venv/bin/ruff check .

‎requirements-dev.lock.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pygments==2.21.0
99
pytest==9.1.1
1010
referencing==0.37.0
1111
rpds-py==2026.6.3
12+
ruff==0.16.9
1213
contourpy==1.4.0
1314
cycler==0.12.1
1415
fonttools==4.65.0

‎tools/claim_receipt.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import hmac
1818
import json
1919
import secrets
20-
from datetime import datetime, timezone
20+
from datetime import UTC, datetime
2121
from pathlib import Path
2222

2323
SECRET_ENV = "FLYPYTHON_CLAIM_SECRET"
@@ -85,7 +85,7 @@ def make_receipt(
8585
},
8686
"impl_sha256": impl_hash,
8787
"solution_match": (impl_hash == solution_hash) if solution_hash else False,
88-
"created_at": datetime.now(timezone.utc).isoformat(timespec="milliseconds").replace("+00:00", "Z"),
88+
"created_at": datetime.now(UTC).isoformat(timespec="milliseconds").replace("+00:00", "Z"),
8989
"nonce": secrets.token_hex(16),
9090
}
9191
receipt["sig"] = hmac.new(

‎tools/verify_courses.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,9 @@ def check_shared_core(courses: list[Path]) -> list[str]:
376376
shapes.append(list(zip(
377377
re.findall(r'"id":\s*"(l\d+|capstone)"', verify),
378378
re.findall(r'"gate":\s*"([a-z-]+)"', verify),
379+
strict=False,
379380
)))
380-
for member, shape in zip(members[1:], shapes[1:]):
381+
for member, shape in zip(members[1:], shapes[1:], strict=True):
381382
if shape != shapes[0]:
382383
problems.append(
383384
f"core-group {group}: {member.name} checkpoint ids/gates differ from {members[0].name}"

0 commit comments

Comments
 (0)