chore(deps): update pre-commit hooks (#5605)

* chore(deps): update pre-commit hooks

updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.7 → v20.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.7...v20.1.0)
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.11.4)
- [github.com/PyCQA/pylint: v3.3.4 → v3.3.6](https://github.com/PyCQA/pylint/compare/v3.3.4...v3.3.6)
- [github.com/python-jsonschema/check-jsonschema: 0.31.2 → 0.32.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.2...0.32.1)

* style: pre-commit fixes

* Update setup.py

* Update tests/test_enum.py

* Update configure.yml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
pre-commit-ci[bot]
2025-04-10 18:31:28 -04:00
committed by GitHub
parent d25e91fb8f
commit a2951abbec
7 changed files with 23 additions and 25 deletions

View File

@@ -24,16 +24,16 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
runs-on: [ubuntu-20.04, macos-13, windows-latest] runs-on: [ubuntu-22.04, macos-13, windows-latest]
arch: [x64] arch: [x64]
cmake: ["3.26"] cmake: ["3.26"]
include: include:
- runs-on: ubuntu-20.04 - runs-on: ubuntu-22.04
arch: x64 arch: x64
cmake: "3.15" cmake: "3.15"
- runs-on: ubuntu-20.04 - runs-on: ubuntu-22.04
arch: x64 arch: x64
cmake: "3.29" cmake: "3.29"

View File

@@ -25,14 +25,14 @@ repos:
# Clang format the codebase automatically # Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format - repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v19.1.7" rev: "v20.1.0"
hooks: hooks:
- id: clang-format - id: clang-format
types_or: [c++, c, cuda] types_or: [c++, c, cuda]
# Ruff, the Python auto-correcting linter/formatter written in Rust # Ruff, the Python auto-correcting linter/formatter written in Rust
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9 rev: v0.11.4
hooks: hooks:
- id: ruff - id: ruff
args: ["--fix", "--show-fixes"] args: ["--fix", "--show-fixes"]
@@ -144,14 +144,14 @@ repos:
# PyLint has native support - not always usable, but works for us # PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint - repo: https://github.com/PyCQA/pylint
rev: "v3.3.4" rev: "v3.3.6"
hooks: hooks:
- id: pylint - id: pylint
files: ^pybind11 files: ^pybind11
# Check schemas on some of our YAML files # Check schemas on some of our YAML files
- repo: https://github.com/python-jsonschema/check-jsonschema - repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.2 rev: 0.32.1
hooks: hooks:
- id: check-readthedocs - id: check-readthedocs
- id: check-github-workflows - id: check-github-workflows

View File

@@ -51,7 +51,7 @@ def build_expected_version_hex(matches: dict[str, str]) -> str:
# PYBIND11_GLOBAL_SDIST will build a different sdist, with the python-headers # PYBIND11_GLOBAL_SDIST will build a different sdist, with the python-headers
# files, and the sys.prefix files (CMake and headers). # files, and the sys.prefix files (CMake and headers).
global_sdist = os.environ.get("PYBIND11_GLOBAL_SDIST", False) global_sdist = os.environ.get("PYBIND11_GLOBAL_SDIST")
setup_py = Path( setup_py = Path(
"tools/setup_global.py.in" if global_sdist else "tools/setup_main.py.in" "tools/setup_global.py.in" if global_sdist else "tools/setup_main.py.in"

View File

@@ -59,15 +59,13 @@ def test_unscoped_enum():
"EThree": m.UnscopedEnum.EThree, "EThree": m.UnscopedEnum.EThree,
} }
for docstring_line in """An unscoped enumeration for docstring_line in [
"An unscoped enumeration",
Members: "Members:",
" EOne : Docstring for EOne",
EOne : Docstring for EOne " ETwo : Docstring for ETwo",
" EThree : Docstring for EThree",
ETwo : Docstring for ETwo ]:
EThree : Docstring for EThree""".split("\n"):
assert docstring_line in m.UnscopedEnum.__doc__ assert docstring_line in m.UnscopedEnum.__doc__
# Unscoped enums will accept ==/!= int comparisons # Unscoped enums will accept ==/!= int comparisons