]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] Update pre-commit hooks (GH-137591) (GH-137641)
author🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Tue, 12 Aug 2025 11:42:55 +0000 (13:42 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Aug 2025 11:42:55 +0000 (13:42 +0200)
(cherry picked from commit b36d23f58e8ab85b8576ab59c2ce72572c2cb12a)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
.github/workflows/build.yml
.pre-commit-config.yaml
Lib/test/.ruff.toml

index e3b8014da0d80fe94eea1aca066d1b2b847d3b65..ba19ff54ca5913f4c7e2eb9f6984f2f9af7f2d8c 100644 (file)
@@ -231,8 +231,8 @@ jobs:
       free-threading: ${{ matrix.free-threading }}
 
   build-windows-msi:
-    name: >-  # ${{ '' } is a hack to nest jobs under the same sidebar category
-      Windows MSI${{ '' }}
+    # ${{ '' } is a hack to nest jobs under the same sidebar category.
+    name: Windows MSI${{ '' }}  # zizmor: ignore[obfuscation]
     needs: build-context
     if: fromJSON(needs.build-context.outputs.run-windows-msi)
     strategy:
@@ -546,8 +546,8 @@ jobs:
       run: xvfb-run make test
 
   build-san:
-    name: >-  # ${{ '' } is a hack to nest jobs under the same sidebar category
-      Sanitizers${{ '' }}
+    # ${{ '' } is a hack to nest jobs under the same sidebar category.
+    name: Sanitizers${{ '' }}  # zizmor: ignore[obfuscation]
     needs: build-context
     if: needs.build-context.outputs.run-tests == 'true'
     strategy:
index c445ef627a20c4685c6b9ed5012a9cf5fa6d0d6f..cdf458fa6b686c3a1ea1812fe6a4ad63d953ad7f 100644 (file)
@@ -1,6 +1,6 @@
 repos:
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.11.6
+    rev: v0.12.8
     hooks:
       - id: ruff
         name: Run Ruff (lint) on Doc/
@@ -34,7 +34,7 @@ repos:
         exclude: ^Tools/c-analyzer/cpython/_parser.py
 
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v5.0.0
+    rev: v6.0.0
     hooks:
       - id: check-case-conflict
       - id: check-merge-conflict
@@ -52,7 +52,7 @@ repos:
         files: '^\.github/CODEOWNERS|\.(gram)$'
 
   - repo: https://github.com/woodruffw/zizmor-pre-commit
-    rev: v1.6.0
+    rev: v1.11.0
     hooks:
       - id: zizmor
 
index fa8b2b42579b4a2a531d16a45bd6eda77e4acc69..218eefe5255706ddbe310579bb6e00847f11de9b 100644 (file)
@@ -1,4 +1,5 @@
 fix = true
+target-version = "py312"
 extend-exclude = [
     # Excluded (run with the other AC files in its own separate ruff job in pre-commit)
     "test_clinic.py",
@@ -12,6 +13,15 @@ extend-exclude = [
     "test_grammar.py",
 ]
 
+[per-file-target-version]
+# Type parameter defaults
+"test_type_params.py" = "py313"
+
+# Template string literals
+"test_annotationlib.py" = "py314"
+"test_string/test_templatelib.py" = "py314"
+"test_tstring.py" = "py314"
+
 [lint]
 select = [
     "F811",  # Redefinition of unused variable (useful for finding test methods with the same name)