From 31b3bd737a66ff55da3c4a552dace6d686e9f144 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Wed, 17 Dec 2025 16:28:10 -0500 Subject: [PATCH] Update linting scripts to use ruff version installed by uv --- .github/workflows/build.yaml | 14 +++++++------- .github/workflows/format.yaml | 14 +++++++------- scripts/fix-ruff.sh | 4 ++-- scripts/pre-commit.sh | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c9694e5ce..b6bb5b3ed 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,20 +21,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - name: Install uv uses: astral-sh/setup-uv@v3 with: version: "latest" - + - name: Set up Python - run: uv python install 3.10 - + run: uv python install 3.12 + - name: Install development dependencies run: uv sync --group dev - + - name: Build project run: uv build - + - name: Install project in editable mode - run: uv pip install --editable . \ No newline at end of file + run: uv pip install --editable . diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 2132ce021..8284be043 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -22,22 +22,22 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - + - name: Install uv uses: astral-sh/setup-uv@v3 with: version: "latest" - + - name: Set up Python - run: uv python install 3.10 - + run: uv python install 3.12 + - name: Install development dependencies run: uv sync --group dev - + - name: Ruff formatter id: ruff-format run: uv run ruff format --diff - + - name: Ruff linter (all rules) id: ruff-check - run: uv run ruff check \ No newline at end of file + run: uv run ruff check diff --git a/scripts/fix-ruff.sh b/scripts/fix-ruff.sh index 9af02c48b..96c6a278b 100755 --- a/scripts/fix-ruff.sh +++ b/scripts/fix-ruff.sh @@ -5,6 +5,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" echo "Running ruff format..." -ruff format "$PROJECT_ROOT" +uv run ruff format "$PROJECT_ROOT" echo "Running ruff check..." -ruff check --fix "$PROJECT_ROOT" +uv run ruff check --fix "$PROJECT_ROOT" diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index 1341a8575..44a17cc19 100755 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -12,14 +12,14 @@ cd "$(dirname "$0")/.." # Format check echo "📝 Checking code formatting..." -if ! NO_COLOR=1 ruff format --diff --check; then - echo -e "${RED}❌ Code formatting issues found. Run 'ruff format' to fix.${NC}" +if ! NO_COLOR=1 uv run ruff format --diff --check; then + echo -e "${RED}❌ Code formatting issues found. Run 'uv run ruff format' to fix.${NC}" exit 1 fi # Lint check echo "🔍 Running linter..." -if ! ruff check; then +if ! uv run ruff check; then echo -e "${RED}❌ Linting issues found.${NC}" exit 1 fi