From e5695200616d7f906a9ed17f14ab11a3edbeb755 Mon Sep 17 00:00:00 2001 From: Jeppe Fihl-Pearson Date: Thu, 12 Dec 2024 10:10:00 +0000 Subject: [PATCH] Add Zizmor pre-commit hook This also updates Ruff to the latest version and bumps the target Python version to 3.13, although it doesn't carry any changes with it for now. --- .github/workflows/pre-commit.yml | 4 +++- .pre-commit-config.yaml | 7 ++++++- pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 02fa343..a4ccc72 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -15,11 +15,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Pre-commit uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed54268..29182ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,15 @@ --- repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.2 hooks: - id: ruff args: - --fix - --exit-non-zero-on-fix - id: ruff-format + + - repo: https://github.com/woodruffw/zizmor-pre-commit + rev: v0.8.0 + hooks: + - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index 37d226a..185f7d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.ruff] -target-version = "py38" +target-version = "py313" [tool.ruff.lint] select = ["ALL"]