From aa4259b4f835177cdd1da81ca1221f77cd84d5c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 11 Oct 2025 10:23:50 -0700 Subject: [PATCH] chore(deps): update pre-commit hooks (#5820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update pre-commit hooks updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.8 → v21.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.8...v21.1.2) - [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.7...v0.13.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.1...v1.18.2) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/adamchainz/blacken-docs: 1.19.1 → 1.20.0](https://github.com/adamchainz/blacken-docs/compare/1.19.1...1.20.0) - [github.com/shellcheck-py/shellcheck-py: v0.10.0.1 → v0.11.0.1](https://github.com/shellcheck-py/shellcheck-py/compare/v0.10.0.1...v0.11.0.1) - [github.com/PyCQA/pylint: v3.3.7 → v3.3.9](https://github.com/PyCQA/pylint/compare/v3.3.7...v3.3.9) - [github.com/python-jsonschema/check-jsonschema: 0.33.2 → 0.34.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.33.2...0.34.0) * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 16 ++++++++-------- include/pybind11/detail/common.h | 3 +-- include/pybind11/eigen/tensor.h | 7 +++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8435fbac9..8ffc34ea3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,14 +25,14 @@ repos: # Clang format the codebase automatically - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v20.1.8" + rev: "v21.1.2" hooks: - id: clang-format types_or: [c++, c, cuda] # Ruff, the Python auto-correcting linter/formatter written in Rust - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.7 + rev: v0.13.3 hooks: - id: ruff-check args: ["--fix", "--show-fixes"] @@ -40,7 +40,7 @@ repos: # Check static types with mypy - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.17.1" + rev: "v1.18.2" hooks: - id: mypy args: [] @@ -62,7 +62,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" + rev: "v6.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -80,7 +80,7 @@ repos: # Also code format the docs - repo: https://github.com/adamchainz/blacken-docs - rev: "1.19.1" + rev: "1.20.0" hooks: - id: blacken-docs additional_dependencies: @@ -120,7 +120,7 @@ repos: # Check for common shell mistakes - repo: https://github.com/shellcheck-py/shellcheck-py - rev: "v0.10.0.1" + rev: "v0.11.0.1" hooks: - id: shellcheck @@ -135,14 +135,14 @@ repos: # PyLint has native support - not always usable, but works for us - repo: https://github.com/PyCQA/pylint - rev: "v3.3.7" + rev: "v3.3.9" hooks: - id: pylint files: ^pybind11 # Check schemas on some of our YAML files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.33.2 + rev: 0.34.0 hooks: - id: check-readthedocs - id: check-github-workflows diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 22dfc62b4..16952c582 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -1293,8 +1293,7 @@ template #if defined(_MSC_VER) && _MSC_VER < 1920 // MSVC 2017 constexpr #endif - inline void - silence_unused_warnings(Args &&...) { + inline void silence_unused_warnings(Args &&...) { } // MSVC warning C4100: Unreferenced formal parameter diff --git a/include/pybind11/eigen/tensor.h b/include/pybind11/eigen/tensor.h index 50e8b50b1..e5c844103 100644 --- a/include/pybind11/eigen/tensor.h +++ b/include/pybind11/eigen/tensor.h @@ -124,10 +124,9 @@ struct eigen_tensor_helper< template struct get_tensor_descriptor { static constexpr auto details - = const_name(", \"flags.writeable\"", "") + const_name - < static_cast(Type::Layout) - == static_cast(Eigen::RowMajor) - > (", \"flags.c_contiguous\"", ", \"flags.f_contiguous\""); + = const_name(", \"flags.writeable\"", "") + + const_name(Type::Layout) == static_cast(Eigen::RowMajor)>( + ", \"flags.c_contiguous\"", ", \"flags.f_contiguous\""); static constexpr auto value = const_name("typing.Annotated[") + io_name("numpy.typing.ArrayLike, ", "numpy.typing.NDArray[")