From bd33dcbe67601ce78ff83200fe8785dc9068371b Mon Sep 17 00:00:00 2001 From: Anisse Astier Date: Fri, 10 Jan 2025 15:23:25 +0100 Subject: [PATCH] ruff: pin version used for checks By default "uv tool run" will manage tools separately, and install the latest version of the tools unless a version is specified. --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index be8552a..0226e3b 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ all: SOURCES = hwbench csv graph +RUFF_VERSION = 0.8.6 + update_deps: uv sync -U @@ -18,15 +20,15 @@ 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) @@ -34,4 +36,4 @@ bundle: uv build format: - uv tool run ruff format $(SOURCES) + uv tool run ruff@$(RUFF_VERSION) format $(SOURCES)