Skip to content

Commit

Permalink
ruff: pin version used for checks
Browse files Browse the repository at this point in the history
By default "uv tool run" will manage tools separately, and install the
latest version of the tools unless a version is specified.
  • Loading branch information
anisse committed Jan 10, 2025
1 parent 1607ed7 commit bd33dcb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ all:

SOURCES = hwbench csv graph

RUFF_VERSION = 0.8.6

update_deps:
uv sync -U

Expand All @@ -18,20 +20,20 @@ clean:

check:
@uv lock --locked || echo "Your lock file should change because you probably added a dependency or bump the minimal Python version. Please run `uv lock`"
uv tool run ruff format --diff $(SOURCES)
uv tool run ruff check $(SOURCES)
uv tool run ruff@$(RUFF_VERSION) format --diff $(SOURCES)
uv tool run ruff@$(RUFF_VERSION) check $(SOURCES)
uv run mypy $(SOURCES)
uv run pytest $(SOURCES)

check_ci:
@uv lock --locked || echo "Your lock file should change because you probably added a dependency or bump the minimal Python version, but this is not allowed in the CI. Please run `uv lock`"
uv tool run ruff format --diff $(SOURCES)
uv tool run ruff check --output-format=github $(SOURCES)
uv tool run ruff@$(RUFF_VERSION) format --diff $(SOURCES)
uv tool run ruff@$(RUFF_VERSION) check --output-format=github $(SOURCES)
uv run mypy $(SOURCES)
uv run pytest $(SOURCES)

bundle:
uv build

format:
uv tool run ruff format $(SOURCES)
uv tool run ruff@$(RUFF_VERSION) format $(SOURCES)

0 comments on commit bd33dcb

Please sign in to comment.