From ee90e81f7c4836a557a4248c2090535135670dd6 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 2 Jan 2026 07:34:46 +0000 Subject: [PATCH] Switch from pre-commit to prek --- .github/workflows/lint.yml | 6 +++--- .pre-commit-config.yaml | 2 +- docs/source/contributing.rst | 8 ++++---- pyproject.toml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5127a1bbc..c850e0fad 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,9 +34,9 @@ jobs: - name: Lint run: | - uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose - uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose - uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose + uv run --extra=dev prek run --all-files --hook-stage pre-commit --verbose + uv run --extra=dev prek run --all-files --hook-stage pre-push --verbose + uv run --extra=dev prek run --all-files --hook-stage manual --verbose env: UV_PYTHON: ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 610a8ad0d..d4d9fa9da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,7 +44,7 @@ ci: # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -default_install_hook_types: [pre-commit, pre-push, commit-msg] +default_install_hook_types: [pre-commit, pre-push] repos: - repo: meta diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 6d7d40a7a..b93e5f20b 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -31,7 +31,7 @@ Install ``pre-commit`` hooks: .. code-block:: console - $ pre-commit install + $ prek install Linting ------- @@ -40,9 +40,9 @@ Run lint tools either by committing, or with: .. code-block:: console - $ pre-commit run --all-files --hook-stage pre-commit --verbose - $ pre-commit run --all-files --hook-stage pre-push --verbose - $ pre-commit run --all-files --hook-stage manual --verbose + $ prek run --all-files --hook-stage pre-commit --verbose + $ prek run --all-files --hook-stage pre-push --verbose + $ prek run --all-files --hook-stage manual --verbose .. _Homebrew: https://brew.sh diff --git a/pyproject.toml b/pyproject.toml index 2f7f51e68..bf20a3bb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "interrogate==1.7.0", "mypy[faster-cache]==1.19.1", "mypy-strict-kwargs==2025.4.3", - "pre-commit==4.5.1", + "prek==0.2.25", "pydocstyle==6.3", "pylint[spelling]==4.0.4", "pylint-per-file-ignores==3.2.0",