From 27cf0634810e8a431254978d964743f22720b57a Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Fri, 26 Dec 2025 15:22:10 +0100 Subject: [PATCH 1/3] Update `.pre-commit-config.yaml` as in https://github.com/fastapi/fastapi/pull/14397/files --- .pre-commit-config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 584ba3cbee..6f5c887c76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,5 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -default_language_version: - python: python3.10 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 @@ -20,6 +18,3 @@ repos: args: - --fix - id: ruff-format -ci: - autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks - autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate From e74c79a8f1b09e02c39ea98011b6333e5412873e Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Fri, 26 Dec 2025 15:24:05 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=A7=20Update=20pre-commit=20to=20u?= =?UTF-8?q?se=20local=20Ruff=20instead=20of=20hook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f5c887c76..c08912c072 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,17 +4,26 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - - id: check-added-large-files - - id: check-toml - - id: check-yaml + - id: check-added-large-files + - id: check-toml + - id: check-yaml args: - --unsafe - - id: end-of-file-fixer - - id: trailing-whitespace -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.8 + - id: end-of-file-fixer + - id: trailing-whitespace + +- repo: local hooks: - - id: ruff - args: - - --fix - - id: ruff-format + - id: local-ruff-check + name: ruff check + entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix + require_serial: true + language: unsupported + types: [python] + + - id: local-ruff-format + name: ruff format + entry: uv run ruff format --force-exclude --exit-non-zero-on-format + require_serial: true + language: unsupported + types: [python] From 0af1f1cb5812e7640c1e0db6257664970dae3917 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Fri, 26 Dec 2025 15:26:34 +0100 Subject: [PATCH 3/3] Relax pin of `prek` to `<1.0.0` --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d45416e45a..63212c3507 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ -r requirements-tests.txt -r requirements-docs.txt -prek==0.2.22 +prek>=0.2.24,<1.0.0