Skip to content

Commit 361278d

Browse files
committed
[3.14] Update pre-commit with zizmor and Ruff fixes (GH-143095)
(cherry picked from commit f783cc3) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent aee8c21 commit 361278d

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@ updates:
1212
update-types:
1313
- "version-update:semver-minor"
1414
- "version-update:semver-patch"
15+
cooldown:
16+
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
17+
# Cooldowns protect against supply chain attacks by avoiding the
18+
# highest-risk window immediately after new releases.
19+
default-days: 14
1520
- package-ecosystem: "pip"
1621
directory: "/Tools/"
1722
schedule:
1823
interval: "monthly"
1924
labels:
2025
- "skip issue"
2126
- "skip news"
27+
cooldown:
28+
default-days: 14

.github/workflows/tail-call.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,24 @@ jobs:
8181

8282
- name: Native Windows (debug)
8383
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
84-
shell: cmd
84+
shell: pwsh
8585
run: |
8686
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
87-
set PlatformToolset=clangcl
88-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
89-
set LLVMInstallDir=C:\Program Files\LLVM
90-
call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91-
call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
87+
$env:PlatformToolset = "clangcl"
88+
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
89+
$env:LLVMInstallDir = "C:\Program Files\LLVM"
90+
./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91+
./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
9292
9393
# No tests (yet):
9494
- name: Emulated Windows (release)
9595
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
96-
shell: cmd
96+
shell: pwsh
9797
run: |
9898
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
99-
set PlatformToolset=clangcl
100-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
101-
set LLVMInstallDir=C:\Program Files\LLVM
99+
$env:PlatformToolset = "clangcl"
100+
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
101+
$env:LLVMInstallDir = "C:\Program Files\LLVM"
102102
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
103103
104104
- name: Native macOS (release)

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.13.2
3+
rev: v0.14.10
44
hooks:
55
- id: ruff-check
66
name: Run Ruff (lint) on Apple/
@@ -52,7 +52,7 @@ repos:
5252
files: ^Tools/wasm/
5353

5454
- repo: https://github.com/psf/black-pre-commit-mirror
55-
rev: 25.9.0
55+
rev: 25.12.0
5656
hooks:
5757
- id: black
5858
name: Run Black on Tools/jit/
@@ -83,24 +83,24 @@ repos:
8383
files: '^\.github/CODEOWNERS|\.(gram)$'
8484

8585
- repo: https://github.com/python-jsonschema/check-jsonschema
86-
rev: 0.34.0
86+
rev: 0.36.0
8787
hooks:
8888
- id: check-dependabot
8989
- id: check-github-workflows
9090
- id: check-readthedocs
9191

9292
- repo: https://github.com/rhysd/actionlint
93-
rev: v1.7.7
93+
rev: v1.7.9
9494
hooks:
9595
- id: actionlint
9696

9797
- repo: https://github.com/woodruffw/zizmor-pre-commit
98-
rev: v1.14.1
98+
rev: v1.19.0
9999
hooks:
100100
- id: zizmor
101101

102102
- repo: https://github.com/sphinx-contrib/sphinx-lint
103-
rev: v1.0.0
103+
rev: v1.0.2
104104
hooks:
105105
- id: sphinx-lint
106106
args: [--enable=default-role]

Doc/tools/check-warnings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,11 @@ def main(argv: list[str] | None = None) -> int:
311311
if not Path("Doc").exists() or not Path("Doc").is_dir():
312312
raise RuntimeError(wrong_directory_msg)
313313

314-
with Path("Doc/sphinx-warnings.txt").open(encoding="UTF-8") as f:
315-
warnings = f.read().splitlines()
314+
warnings = (
315+
Path("Doc/sphinx-warnings.txt")
316+
.read_text(encoding="UTF-8")
317+
.splitlines()
318+
)
316319

317320
cwd = str(Path.cwd()) + os.path.sep
318321
files_with_nits = {

0 commit comments

Comments
 (0)