Skip to content

Commit ac96a57

Browse files
committed
fix lint
Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent 949237f commit ac96a57

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎Makefile‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ RUFF := .venv/bin/ruff
22
PYTEST := .venv/bin/pytest
33
MATURIN := .venv/bin/maturin
44

5+
# Pinned so lint results don't shift when ruff changes its default rule set.
6+
RUFF_VERSION := ruff==0.15.15
7+
58
.PHONY: help build install dev test clean daemon-build daemon-release test-e2e docker-build docker-down
69

710
help:
@@ -74,15 +77,18 @@ docker-down:
7477
lint: $(RUFF)
7578
$(RUFF) check .
7679

80+
# `check --fix` exits non-zero when unfixable errors remain, which would stop
81+
# make before the formatter runs -- hence the leading `-`. `make lint` is what
82+
# gates on remaining errors.
7783
.PHONY: format
7884
format: $(RUFF)
79-
$(RUFF) check --fix .
85+
-$(RUFF) check --fix .
8086
$(RUFF) format .
8187

8288
$(RUFF):
8389
@echo "Installing ruff..."
8490
@python3 -m venv .venv || true
85-
@.venv/bin/pip install --quiet ruff
91+
@.venv/bin/pip install --quiet '$(RUFF_VERSION)'
8692
@echo "Ruff installed successfully"
8793

8894
$(PYTEST):

0 commit comments

Comments
 (0)