mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Update pre-commit with zizmor and Ruff fixes (#143095)
This commit is contained in:
parent
6536fab194
commit
f783cc37eb
3 changed files with 18 additions and 14 deletions
13
.github/workflows/tail-call.yml
vendored
13
.github/workflows/tail-call.yml
vendored
|
|
@ -81,22 +81,23 @@ jobs:
|
||||||
|
|
||||||
- name: Native Windows MSVC (release)
|
- name: Native Windows MSVC (release)
|
||||||
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
|
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
|
||||||
shell: cmd
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
choco install visualstudio2026buildtools --no-progress -y --force --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --locale en-US --passive"
|
choco install visualstudio2026buildtools --no-progress -y --force --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --locale en-US --passive"
|
||||||
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\bin;$env:PATH"
|
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\bin;$env:PATH"
|
||||||
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }} "/p:PlatformToolset=v145"
|
$env:PlatformToolset = "v145"
|
||||||
|
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
|
||||||
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
|
||||||
|
|
||||||
# No tests (yet):
|
# No tests (yet):
|
||||||
- name: Emulated Windows Clang (release)
|
- name: Emulated Windows Clang (release)
|
||||||
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
|
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
|
||||||
shell: cmd
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
|
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
|
||||||
set PlatformToolset=clangcl
|
$env:PlatformToolset = "clangcl"
|
||||||
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
|
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
|
||||||
set LLVMInstallDir=C:\Program Files\LLVM
|
$env:LLVMInstallDir = "C:\Program Files\LLVM"
|
||||||
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
|
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
|
||||||
|
|
||||||
- name: Native macOS (release)
|
- name: Native macOS (release)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.13.2
|
rev: v0.14.10
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
name: Run Ruff (lint) on Apple/
|
name: Run Ruff (lint) on Apple/
|
||||||
|
|
@ -52,7 +52,7 @@ repos:
|
||||||
files: ^Tools/wasm/
|
files: ^Tools/wasm/
|
||||||
|
|
||||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||||
rev: 25.9.0
|
rev: 25.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
name: Run Black on Tools/jit/
|
name: Run Black on Tools/jit/
|
||||||
|
|
@ -83,24 +83,24 @@ repos:
|
||||||
files: '^\.github/CODEOWNERS|\.(gram)$'
|
files: '^\.github/CODEOWNERS|\.(gram)$'
|
||||||
|
|
||||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||||
rev: 0.34.0
|
rev: 0.36.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-dependabot
|
- id: check-dependabot
|
||||||
- id: check-github-workflows
|
- id: check-github-workflows
|
||||||
- id: check-readthedocs
|
- id: check-readthedocs
|
||||||
|
|
||||||
- repo: https://github.com/rhysd/actionlint
|
- repo: https://github.com/rhysd/actionlint
|
||||||
rev: v1.7.7
|
rev: v1.7.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
||||||
rev: v1.14.1
|
rev: v1.19.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: zizmor
|
- id: zizmor
|
||||||
|
|
||||||
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
- repo: https://github.com/sphinx-contrib/sphinx-lint
|
||||||
rev: v1.0.0
|
rev: v1.0.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: sphinx-lint
|
- id: sphinx-lint
|
||||||
args: [--enable=default-role]
|
args: [--enable=default-role]
|
||||||
|
|
|
||||||
|
|
@ -311,8 +311,11 @@ def main(argv: list[str] | None = None) -> int:
|
||||||
if not Path("Doc").exists() or not Path("Doc").is_dir():
|
if not Path("Doc").exists() or not Path("Doc").is_dir():
|
||||||
raise RuntimeError(wrong_directory_msg)
|
raise RuntimeError(wrong_directory_msg)
|
||||||
|
|
||||||
with Path("Doc/sphinx-warnings.txt").open(encoding="UTF-8") as f:
|
warnings = (
|
||||||
warnings = f.read().splitlines()
|
Path("Doc/sphinx-warnings.txt")
|
||||||
|
.read_text(encoding="UTF-8")
|
||||||
|
.splitlines()
|
||||||
|
)
|
||||||
|
|
||||||
cwd = str(Path.cwd()) + os.path.sep
|
cwd = str(Path.cwd()) + os.path.sep
|
||||||
files_with_nits = {
|
files_with_nits = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue