Skip to content

Commit 5c29561

Browse files
adeebshihadehclaude
andcommitted
uv-lfs: fix CI — add setup-uv action and ruff lint
- Add astral-sh/setup-uv@v5 before uv sync in all workflows (build release, prebuilt, model_review) so uv is available - Fix ruff B904: use `raise ... from e` in protocol.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 91b9748 commit 5c29561

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.github/workflows/model_review.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
with:
2525
ref: master
2626
path: base
27+
- uses: astral-sh/setup-uv@v5
2728
- run: uv sync --frozen --all-extras && .venv/bin/uv-lfs install && .venv/bin/uv-lfs checkout
2829
- run: cd base && uv sync --frozen --all-extras && .venv/bin/uv-lfs install && .venv/bin/uv-lfs checkout
2930

.github/workflows/prebuilt.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- uses: actions/checkout@v6
3333
with:
3434
submodules: true
35+
- uses: astral-sh/setup-uv@v5
3536
- run: uv sync --frozen --all-extras && .venv/bin/uv-lfs install && .venv/bin/uv-lfs checkout
3637
- name: Build and Push docker image
3738
run: |

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- uses: actions/checkout@v6
3939
with:
4040
submodules: true
41+
- uses: astral-sh/setup-uv@v5
4142
- name: Install uv-lfs
4243
run: uv sync --frozen --all-extras && .venv/bin/uv-lfs install
4344
- name: Getting LFS files

tools/uv_lfs/protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def read_pkt_line(stream) -> bytes | None:
4242
return None
4343
try:
4444
length = int(header, 16)
45-
except ValueError:
46-
raise EOFError(f"invalid pkt-line header: {header!r}")
45+
except ValueError as e:
46+
raise EOFError(f"invalid pkt-line header: {header!r}") from e
4747
if length <= 4:
4848
return b""
4949
return _read_exact(stream, length - 4)

0 commit comments

Comments
 (0)