From 7059d8606a253df1fb4032045faa2e81aec48606 Mon Sep 17 00:00:00 2001 From: leohoare Date: Sun, 22 Jun 2025 12:45:16 +0800 Subject: [PATCH] uv-lock in pre-commit, manually run pre-commit instead of action, add mypy and pre-commit to dev dependencies Signed-off-by: leohoare --- .github/workflows/build.yml | 3 ++- .pre-commit-config.yaml | 5 +++++ pyproject.toml | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85a8772..b92bd4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -73,7 +73,7 @@ jobs: run: uv sync --extra dev - name: Run pre-commit - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + run: uv run pre-commit run --all-files sast: runs-on: ubuntu-latest @@ -87,6 +87,7 @@ jobs: uses: astral-sh/setup-uv@v5 with: python-version: "3.13" + cache: false - name: Initialize CodeQL uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 80e23a3..35c0da4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,8 @@ repos: hooks: - id: mypy files: openfeature + + - repo: https://github.com/astral-sh/uv-pre-commit + rev: 0.7.13 # Use the latest version as appropriate + hooks: + - id: uv-lock diff --git a/pyproject.toml b/pyproject.toml index d6d5376..66b144f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,9 @@ dev = [ "behave", "coverage[toml]>=6.5", "pytest", - "pytest-asyncio" + "pytest-asyncio", + "mypy", + "pre-commit" ]