Skip to content

Commit aa4259b

Browse files
chore(deps): update pre-commit hooks (#5820)
* chore(deps): update pre-commit hooks updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.8 → v21.1.2](pre-commit/mirrors-clang-format@v20.1.8...v21.1.2) - [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.13.3](astral-sh/ruff-pre-commit@v0.12.7...v0.13.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](pre-commit/mirrors-mypy@v1.17.1...v1.18.2) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/adamchainz/blacken-docs: 1.19.1 → 1.20.0](adamchainz/blacken-docs@1.19.1...1.20.0) - [github.com/shellcheck-py/shellcheck-py: v0.10.0.1 → v0.11.0.1](shellcheck-py/shellcheck-py@v0.10.0.1...v0.11.0.1) - [github.com/PyCQA/pylint: v3.3.7 → v3.3.9](pylint-dev/pylint@v3.3.7...v3.3.9) - [github.com/python-jsonschema/check-jsonschema: 0.33.2 → 0.34.0](python-jsonschema/check-jsonschema@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>
1 parent 1cf0948 commit aa4259b

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ repos:
2525

2626
# Clang format the codebase automatically
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: "v20.1.8"
28+
rev: "v21.1.2"
2929
hooks:
3030
- id: clang-format
3131
types_or: [c++, c, cuda]
3232

3333
# Ruff, the Python auto-correcting linter/formatter written in Rust
3434
- repo: https://github.com/astral-sh/ruff-pre-commit
35-
rev: v0.12.7
35+
rev: v0.13.3
3636
hooks:
3737
- id: ruff-check
3838
args: ["--fix", "--show-fixes"]
3939
- id: ruff-format
4040

4141
# Check static types with mypy
4242
- repo: https://github.com/pre-commit/mirrors-mypy
43-
rev: "v1.17.1"
43+
rev: "v1.18.2"
4444
hooks:
4545
- id: mypy
4646
args: []
@@ -62,7 +62,7 @@ repos:
6262

6363
# Standard hooks
6464
- repo: https://github.com/pre-commit/pre-commit-hooks
65-
rev: "v5.0.0"
65+
rev: "v6.0.0"
6666
hooks:
6767
- id: check-added-large-files
6868
- id: check-case-conflict
@@ -80,7 +80,7 @@ repos:
8080

8181
# Also code format the docs
8282
- repo: https://github.com/adamchainz/blacken-docs
83-
rev: "1.19.1"
83+
rev: "1.20.0"
8484
hooks:
8585
- id: blacken-docs
8686
additional_dependencies:
@@ -120,7 +120,7 @@ repos:
120120

121121
# Check for common shell mistakes
122122
- repo: https://github.com/shellcheck-py/shellcheck-py
123-
rev: "v0.10.0.1"
123+
rev: "v0.11.0.1"
124124
hooks:
125125
- id: shellcheck
126126

@@ -135,14 +135,14 @@ repos:
135135

136136
# PyLint has native support - not always usable, but works for us
137137
- repo: https://github.com/PyCQA/pylint
138-
rev: "v3.3.7"
138+
rev: "v3.3.9"
139139
hooks:
140140
- id: pylint
141141
files: ^pybind11
142142

143143
# Check schemas on some of our YAML files
144144
- repo: https://github.com/python-jsonschema/check-jsonschema
145-
rev: 0.33.2
145+
rev: 0.34.0
146146
hooks:
147147
- id: check-readthedocs
148148
- id: check-github-workflows

include/pybind11/detail/common.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,8 +1293,7 @@ template <typename... Args>
12931293
#if defined(_MSC_VER) && _MSC_VER < 1920 // MSVC 2017
12941294
constexpr
12951295
#endif
1296-
inline void
1297-
silence_unused_warnings(Args &&...) {
1296+
inline void silence_unused_warnings(Args &&...) {
12981297
}
12991298

13001299
// MSVC warning C4100: Unreferenced formal parameter

include/pybind11/eigen/tensor.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ struct eigen_tensor_helper<
124124
template <typename Type, bool ShowDetails, bool NeedsWriteable = false>
125125
struct get_tensor_descriptor {
126126
static constexpr auto details
127-
= const_name<NeedsWriteable>(", \"flags.writeable\"", "") + const_name
128-
< static_cast<int>(Type::Layout)
129-
== static_cast<int>(Eigen::RowMajor)
130-
> (", \"flags.c_contiguous\"", ", \"flags.f_contiguous\"");
127+
= const_name<NeedsWriteable>(", \"flags.writeable\"", "")
128+
+ const_name<static_cast<int>(Type::Layout) == static_cast<int>(Eigen::RowMajor)>(
129+
", \"flags.c_contiguous\"", ", \"flags.f_contiguous\"");
131130
static constexpr auto value
132131
= const_name("typing.Annotated[")
133132
+ io_name("numpy.typing.ArrayLike, ", "numpy.typing.NDArray[")

0 commit comments

Comments
 (0)