Skip to content

Commit bb18c88

Browse files
hugovkmiss-islington
authored andcommitted
pythongh-92266: Update pre-commit (pythonGH-139411)
(cherry picked from commit 800d856) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 1ae1db8 commit bb18c88

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
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/build/
1515
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
1616
files: ^Tools/build/
17-
- id: ruff
17+
- id: ruff-check
1818
name: Run Ruff (lint) on Tools/i18n/
1919
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
2020
files: ^Tools/i18n/
21-
- id: ruff
21+
- id: ruff-check
2222
name: Run Ruff (lint) on Argument Clinic
2323
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2424
files: ^Tools/clinic/|Lib/test/test_clinic.py
25-
- id: ruff
25+
- id: ruff-check
2626
name: Run Ruff (lint) on Tools/peg_generator/
2727
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
2828
files: ^Tools/peg_generator/
@@ -36,7 +36,7 @@ repos:
3636
files: ^Tools/build/check_warnings.py
3737

3838
- repo: https://github.com/psf/black-pre-commit-mirror
39-
rev: 25.1.0
39+
rev: 25.9.0
4040
hooks:
4141
- id: black
4242
name: Run Black on Tools/jit/
@@ -47,7 +47,6 @@ repos:
4747
hooks:
4848
- id: remove-tabs
4949
types: [python]
50-
exclude: ^Tools/c-analyzer/cpython/_parser.py
5150

5251
- repo: https://github.com/pre-commit/pre-commit-hooks
5352
rev: v6.0.0
@@ -68,7 +67,7 @@ repos:
6867
files: '^\.github/CODEOWNERS|\.(gram)$'
6968

7069
- repo: https://github.com/python-jsonschema/check-jsonschema
71-
rev: 0.33.2
70+
rev: 0.34.0
7271
hooks:
7372
- id: check-dependabot
7473
- id: check-github-workflows
@@ -80,7 +79,7 @@ repos:
8079
- id: actionlint
8180

8281
- repo: https://github.com/woodruffw/zizmor-pre-commit
83-
rev: v1.11.0
82+
rev: v1.14.1
8483
hooks:
8584
- id: zizmor
8685

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)