Skip to content

[3.13] Update pre-commit hooks (GH-137591) #137641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.13
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ jobs:
free-threading: ${{ matrix.free-threading }}

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

build-san:
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
Sanitizers${{ '' }}
# ${{ '' } is a hack to nest jobs under the same sidebar category.
name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
strategy:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.6
rev: v0.12.8
hooks:
- id: ruff
name: Run Ruff (lint) on Doc/
Expand Down Expand Up @@ -34,7 +34,7 @@ repos:
exclude: ^Tools/c-analyzer/cpython/_parser.py

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

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.6.0
rev: v1.11.0
hooks:
- id: zizmor

Expand Down
10 changes: 10 additions & 0 deletions Lib/test/.ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fix = true
target-version = "py312"
extend-exclude = [
# Excluded (run with the other AC files in its own separate ruff job in pre-commit)
"test_clinic.py",
Expand All @@ -12,6 +13,15 @@ extend-exclude = [
"test_grammar.py",
]

[per-file-target-version]
# Type parameter defaults
"test_type_params.py" = "py313"

# Template string literals
"test_annotationlib.py" = "py314"
"test_string/test_templatelib.py" = "py314"
"test_tstring.py" = "py314"

[lint]
select = [
"F811", # Redefinition of unused variable (useful for finding test methods with the same name)
Expand Down
Loading