]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-92266: Update pre-commit (GH-139411) (#139760)
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Mon, 27 Oct 2025 14:14:48 +0000 (16:14 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Oct 2025 14:14:48 +0000 (16:14 +0200)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
.github/actionlint.yaml [new file with mode: 0644]
.pre-commit-config.yaml
Tools/build/.ruff.toml
Tools/clinic/.ruff.toml
Tools/peg_generator/.ruff.toml

diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
new file mode 100644 (file)
index 0000000..267ff6b
--- /dev/null
@@ -0,0 +1,12 @@
+self-hosted-runner:
+  # Pending https://github.com/rhysd/actionlint/issues/533
+  # and https://github.com/rhysd/actionlint/issues/571
+  labels: ["windows-11-arm", "macos-15-intel"]
+
+config-variables: null
+
+paths:
+  .github/workflows/**/*.yml:
+     ignore:
+     - 1st argument of function call is not assignable
+     - SC2(015|038|086|091|097|098|129|155)
index 977b4bd6b33a8fd1a2ba9ec04c51efc3e943b778..aa5dab0ad16dcb2182c03ea2ccbdd8a1c1387513 100644 (file)
@@ -1,24 +1,24 @@
 repos:
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.12.8
+    rev: v0.13.2
     hooks:
-      - id: ruff
+      - id: ruff-check
         name: Run Ruff (lint) on Doc/
         args: [--exit-non-zero-on-fix]
         files: ^Doc/
-      - id: ruff
+      - id: ruff-check
         name: Run Ruff (lint) on Lib/test/
         args: [--exit-non-zero-on-fix]
         files: ^Lib/test/
-      - id: ruff
+      - id: ruff-check
         name: Run Ruff (lint) on Tools/i18n/
         args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
         files: ^Tools/i18n/
-      - id: ruff
+      - id: ruff-check
         name: Run Ruff (lint) on Argument Clinic
         args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
         files: ^Tools/clinic/|Lib/test/test_clinic.py
-      - id: ruff
+      - id: ruff-check
         name: Run Ruff (lint) on Tools/peg_generator/
         args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
         files: ^Tools/peg_generator/
@@ -32,7 +32,7 @@ repos:
         files: ^Tools/wasm/
 
   - repo: https://github.com/psf/black-pre-commit-mirror
-    rev: 25.1.0
+    rev: 25.9.0
     hooks:
       - id: black
         name: Run Black on Tools/jit/
@@ -63,8 +63,20 @@ repos:
       - id: trailing-whitespace
         files: '^\.github/CODEOWNERS|\.(gram)$'
 
+  - repo: https://github.com/python-jsonschema/check-jsonschema
+    rev: 0.34.0
+    hooks:
+      - id: check-dependabot
+      - id: check-github-workflows
+      - id: check-readthedocs
+
+  - repo: https://github.com/rhysd/actionlint
+    rev: v1.7.7
+    hooks:
+      - id: actionlint
+
   - repo: https://github.com/woodruffw/zizmor-pre-commit
-    rev: v1.11.0
+    rev: v1.14.1
     hooks:
       - id: zizmor
 
index dcbf2936290f12fb000dcfd6e3549348e330d399..996f725fdcb9b57069c249cca7c7e932625b9c0a 100644 (file)
@@ -29,7 +29,6 @@ ignore = [
     "F541",    # f-string without any placeholders
     "PYI024",  # Use `typing.NamedTuple` instead of `collections.namedtuple`
     "PYI025",  # Use `from collections.abc import Set as AbstractSet`
-    "UP038",   # Use `X | Y` in `isinstance` call instead of `(X, Y)`
 ]
 
 [lint.per-file-ignores]
index 5033887df0c1cdaa86fc8a7cf1492213bf020949..944d17ee3e9855179653c14d6df4c3d410b3d2d7 100644 (file)
@@ -17,9 +17,6 @@ ignore = [
     # Use f-strings instead of format specifiers.
     # Doesn't always make code more readable.
     "UP032",
-    # Use PEP-604 unions rather than tuples for isinstance() checks.
-    # Makes code slower and more verbose. https://github.com/astral-sh/ruff/issues/7871.
-    "UP038",
 ]
 unfixable = [
     # The autofixes sometimes do the wrong things for these;
index d778cf0df9b49fcb60f15f62eeb46fcaed46b872..bcf57248713df48f2dc329c2f9a964be6c3723d3 100644 (file)
@@ -13,11 +13,6 @@ select = [
     "RUF100",  # Ban unused `# noqa` comments
     "PGH004",  # Ban blanket `# noqa` comments (only ignore specific error codes)
 ]
-ignore = [
-    # Use PEP-604 unions rather than tuples for isinstance() checks.
-    # Makes code slower and more verbose. https://github.com/astral-sh/ruff/issues/7871.
-    "UP038",
-]
 unfixable = [
     # The autofixes sometimes do the wrong things for these;
     # it's better to have to manually look at the code and see how it needs fixing