]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] Update pre-commit with zizmor and Ruff fixes (GH-143095) (GH-143102) (#143113)
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Tue, 23 Dec 2025 19:28:00 +0000 (21:28 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Dec 2025 19:28:00 +0000 (21:28 +0200)
.github/dependabot.yml
.pre-commit-config.yaml
Doc/tools/check-warnings.py

index c8a3165d69036458709f0e492dacdff5598a83d6..7f3376f8ddb1e25e67a79641cfbdfe969f9a6f77 100644 (file)
@@ -12,6 +12,11 @@ updates:
         update-types:
           - "version-update:semver-minor"
           - "version-update:semver-patch"
+    cooldown:
+      # https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
+      # Cooldowns protect against supply chain attacks by avoiding the
+      # highest-risk window immediately after new releases.
+      default-days: 14
   - package-ecosystem: "pip"
     directory: "/Tools/"
     schedule:
@@ -19,3 +24,5 @@ updates:
     labels:
       - "skip issue"
       - "skip news"
+    cooldown:
+      default-days: 14
index bd23ae5d1fbd93685e9cd7fdcf1cd8edc641cd36..33c0ab8645f13c0e15906feaef0b1d322bcdec60 100644 (file)
@@ -1,6 +1,6 @@
 repos:
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.13.2
+    rev: v0.14.10
     hooks:
       - id: ruff-check
         name: Run Ruff (lint) on Doc/
@@ -36,7 +36,7 @@ repos:
         files: ^Tools/wasm/
 
   - repo: https://github.com/psf/black-pre-commit-mirror
-    rev: 25.9.0
+    rev: 25.12.0
     hooks:
       - id: black
         name: Run Black on Tools/jit/
@@ -68,24 +68,24 @@ repos:
         files: '^\.github/CODEOWNERS|\.(gram)$'
 
   - repo: https://github.com/python-jsonschema/check-jsonschema
-    rev: 0.34.0
+    rev: 0.36.0
     hooks:
       - id: check-dependabot
       - id: check-github-workflows
       - id: check-readthedocs
 
   - repo: https://github.com/rhysd/actionlint
-    rev: v1.7.7
+    rev: v1.7.9
     hooks:
       - id: actionlint
 
   - repo: https://github.com/woodruffw/zizmor-pre-commit
-    rev: v1.14.1
+    rev: v1.19.0
     hooks:
       - id: zizmor
 
   - repo: https://github.com/sphinx-contrib/sphinx-lint
-    rev: v1.0.0
+    rev: v1.0.2
     hooks:
       - id: sphinx-lint
         args: [--enable=default-role]
index 2ddcdb77d16e3f4f38c4dbee7f621487cc3ce363..8beb59af7f61d7f09f2f6d88c1f4a12ed80171a8 100644 (file)
@@ -311,8 +311,11 @@ def main(argv: list[str] | None = None) -> int:
     if not Path("Doc").exists() or not Path("Doc").is_dir():
         raise RuntimeError(wrong_directory_msg)
 
-    with Path("Doc/sphinx-warnings.txt").open(encoding="UTF-8") as f:
-        warnings = f.read().splitlines()
+    warnings = (
+        Path("Doc/sphinx-warnings.txt")
+        .read_text(encoding="UTF-8")
+        .splitlines()
+    )
 
     cwd = str(Path.cwd()) + os.path.sep
     files_with_nits = {