Skip to content

Commit 304412e

Browse files
mhsmithAA-Turner
authored andcommitted
Update pre-commit hooks (#137591)
Co-authored-by: Adam Turner <[email protected]> (cherry picked from commit b36d23f)
1 parent 63a9494 commit 304412e

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ jobs:
231231
free-threading: ${{ matrix.free-threading }}
232232

233233
build-windows-msi:
234-
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
235-
Windows MSI${{ '' }}
234+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
235+
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
236236
needs: build-context
237237
if: fromJSON(needs.build-context.outputs.run-windows-msi)
238238
strategy:
@@ -546,8 +546,8 @@ jobs:
546546
run: xvfb-run make test
547547

548548
build-san:
549-
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
550-
Sanitizers${{ '' }}
549+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
550+
name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
551551
needs: build-context
552552
if: needs.build-context.outputs.run-tests == 'true'
553553
strategy:

.pre-commit-config.yaml

Lines changed: 3 additions & 3 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.11.6
3+
rev: v0.12.8
44
hooks:
55
- id: ruff
66
name: Run Ruff (lint) on Doc/
@@ -34,7 +34,7 @@ repos:
3434
exclude: ^Tools/c-analyzer/cpython/_parser.py
3535

3636
- repo: https://github.com/pre-commit/pre-commit-hooks
37-
rev: v5.0.0
37+
rev: v6.0.0
3838
hooks:
3939
- id: check-case-conflict
4040
- id: check-merge-conflict
@@ -52,7 +52,7 @@ repos:
5252
files: '^\.github/CODEOWNERS|\.(gram)$'
5353

5454
- repo: https://github.com/woodruffw/zizmor-pre-commit
55-
rev: v1.6.0
55+
rev: v1.11.0
5656
hooks:
5757
- id: zizmor
5858

Lib/test/.ruff.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
fix = true
2+
target-version = "py312"
23
extend-exclude = [
34
# Excluded (run with the other AC files in its own separate ruff job in pre-commit)
45
"test_clinic.py",
@@ -12,6 +13,15 @@ extend-exclude = [
1213
"test_grammar.py",
1314
]
1415

16+
[per-file-target-version]
17+
# Type parameter defaults
18+
"test_type_params.py" = "py313"
19+
20+
# Template string literals
21+
"test_annotationlib.py" = "py314"
22+
"test_string/test_templatelib.py" = "py314"
23+
"test_tstring.py" = "py314"
24+
1525
[lint]
1626
select = [
1727
"F811", # Redefinition of unused variable (useful for finding test methods with the same name)

0 commit comments

Comments
 (0)