Skip to content

Commit 2d29aa2

Browse files
authored
[3.13] gh-92266: Update pre-commit (GH-139411) (#139760)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent ec5f541 commit 2d29aa2

File tree

5 files changed

+32
-17
lines changed

5 files changed

+32
-17
lines changed

.github/actionlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
self-hosted-runner:
2+
# Pending https://github.com/rhysd/actionlint/issues/533
3+
# and https://github.com/rhysd/actionlint/issues/571
4+
labels: ["windows-11-arm", "macos-15-intel"]
5+
6+
config-variables: null
7+
8+
paths:
9+
.github/workflows/**/*.yml:
10+
ignore:
11+
- 1st argument of function call is not assignable
12+
- SC2(015|038|086|091|097|098|129|155)

.pre-commit-config.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.8
3+
rev: v0.13.2
44
hooks:
5-
- id: ruff
5+
- id: ruff-check
66
name: Run Ruff (lint) on Doc/
77
args: [--exit-non-zero-on-fix]
88
files: ^Doc/
9-
- id: ruff
9+
- id: ruff-check
1010
name: Run Ruff (lint) on Lib/test/
1111
args: [--exit-non-zero-on-fix]
1212
files: ^Lib/test/
13-
- id: ruff
13+
- id: ruff-check
1414
name: Run Ruff (lint) on Tools/i18n/
1515
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
1616
files: ^Tools/i18n/
17-
- id: ruff
17+
- id: ruff-check
1818
name: Run Ruff (lint) on Argument Clinic
1919
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2020
files: ^Tools/clinic/|Lib/test/test_clinic.py
21-
- id: ruff
21+
- id: ruff-check
2222
name: Run Ruff (lint) on Tools/peg_generator/
2323
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
2424
files: ^Tools/peg_generator/
@@ -32,7 +32,7 @@ repos:
3232
files: ^Tools/wasm/
3333

3434
- repo: https://github.com/psf/black-pre-commit-mirror
35-
rev: 25.1.0
35+
rev: 25.9.0
3636
hooks:
3737
- id: black
3838
name: Run Black on Tools/jit/
@@ -63,8 +63,20 @@ repos:
6363
- id: trailing-whitespace
6464
files: '^\.github/CODEOWNERS|\.(gram)$'
6565

66+
- repo: https://github.com/python-jsonschema/check-jsonschema
67+
rev: 0.34.0
68+
hooks:
69+
- id: check-dependabot
70+
- id: check-github-workflows
71+
- id: check-readthedocs
72+
73+
- repo: https://github.com/rhysd/actionlint
74+
rev: v1.7.7
75+
hooks:
76+
- id: actionlint
77+
6678
- repo: https://github.com/woodruffw/zizmor-pre-commit
67-
rev: v1.11.0
79+
rev: v1.14.1
6880
hooks:
6981
- id: zizmor
7082

Tools/build/.ruff.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ ignore = [
2929
"F541", # f-string without any placeholders
3030
"PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple`
3131
"PYI025", # Use `from collections.abc import Set as AbstractSet`
32-
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
3332
]
3433

3534
[lint.per-file-ignores]

Tools/clinic/.ruff.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ ignore = [
1717
# Use f-strings instead of format specifiers.
1818
# Doesn't always make code more readable.
1919
"UP032",
20-
# Use PEP-604 unions rather than tuples for isinstance() checks.
21-
# Makes code slower and more verbose. https://github.com/astral-sh/ruff/issues/7871.
22-
"UP038",
2320
]
2421
unfixable = [
2522
# The autofixes sometimes do the wrong things for these;

Tools/peg_generator/.ruff.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ select = [
1313
"RUF100", # Ban unused `# noqa` comments
1414
"PGH004", # Ban blanket `# noqa` comments (only ignore specific error codes)
1515
]
16-
ignore = [
17-
# Use PEP-604 unions rather than tuples for isinstance() checks.
18-
# Makes code slower and more verbose. https://github.com/astral-sh/ruff/issues/7871.
19-
"UP038",
20-
]
2116
unfixable = [
2217
# The autofixes sometimes do the wrong things for these;
2318
# it's better to have to manually look at the code and see how it needs fixing

0 commit comments

Comments
 (0)