Skip to content

Commit d2e7e8c

Browse files
chore(deps): update pre-commit hooks (#5513)
* chore(deps): update pre-commit hooks updates: - [github.com/pre-commit/mirrors-clang-format: v19.1.6 → v19.1.7](pre-commit/mirrors-clang-format@v19.1.6...v19.1.7) - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.1](codespell-project/codespell@v2.3.0...v2.4.1) - [github.com/PyCQA/pylint: v3.3.3 → v3.3.4](pylint-dev/pylint@v3.3.3...v3.3.4) - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.1](python-jsonschema/check-jsonschema@0.30.0...0.31.1) * style: pre-commit fixes * Rename `lins` to `lst` in test_pytypes.py to resolve codespell errors: ``` codespell................................................................Failed - hook id: codespell - exit code: 65 tests/test_pytypes.py:55: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:56: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:58: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:70: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:71: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:72: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:73: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:74: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:75: lins ==> lines, links, lions, loins, limns tests/test_pytypes.py:76: lins ==> lines, links, lions, loins, limns ``` --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ralf W. Grosse-Kunstleve <[email protected]>
1 parent ab44b30 commit d2e7e8c

File tree

5 files changed

+23
-24
lines changed

5 files changed

+23
-24
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ repos:
2525

2626
# Clang format the codebase automatically
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: "v19.1.6"
28+
rev: "v19.1.7"
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.8.6
35+
rev: v0.9.4
3636
hooks:
3737
- id: ruff
3838
args: ["--fix", "--show-fixes"]
@@ -119,7 +119,7 @@ repos:
119119
# Use tools/codespell_ignore_lines_from_errors.py
120120
# to rebuild .codespell-ignore-lines
121121
- repo: https://github.com/codespell-project/codespell
122-
rev: "v2.3.0"
122+
rev: "v2.4.1"
123123
hooks:
124124
- id: codespell
125125
exclude: ".supp$"
@@ -142,14 +142,14 @@ repos:
142142

143143
# PyLint has native support - not always usable, but works for us
144144
- repo: https://github.com/PyCQA/pylint
145-
rev: "v3.3.3"
145+
rev: "v3.3.4"
146146
hooks:
147147
- id: pylint
148148
files: ^pybind11
149149

150150
# Check schemas on some of our YAML files
151151
- repo: https://github.com/python-jsonschema/check-jsonschema
152-
rev: 0.30.0
152+
rev: 0.31.1
153153
hooks:
154154
- id: check-readthedocs
155155
- id: check-github-workflows

tests/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ def pytest_configure():
212212

213213
def pytest_report_header(config):
214214
del config # Unused.
215-
assert (
216-
pybind11_tests.compiler_info is not None
217-
), "Please update pybind11_tests.cpp if this assert fails."
215+
assert pybind11_tests.compiler_info is not None, (
216+
"Please update pybind11_tests.cpp if this assert fails."
217+
)
218218
return (
219219
"C++ Info:"
220220
f" {pybind11_tests.compiler_info}"

tests/test_eigen_matrix.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ def test_eigen_ref_to_python():
244244
chols = [m.cholesky1, m.cholesky2, m.cholesky3, m.cholesky4]
245245
for i, chol in enumerate(chols, start=1):
246246
mymat = chol(np.array([[1.0, 2, 4], [2, 13, 23], [4, 23, 77]]))
247-
assert np.all(
248-
mymat == np.array([[1, 0, 0], [2, 3, 0], [4, 5, 6]])
249-
), f"cholesky{i}"
247+
assert np.all(mymat == np.array([[1, 0, 0], [2, 3, 0], [4, 5, 6]])), (
248+
f"cholesky{i}"
249+
)
250250

251251

252252
def assign_both(a1, a2, r, c, v):

tests/test_pytypes.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def test_from_iterable(pytype, from_iter_func):
5252

5353
def test_iterable(doc):
5454
assert doc(m.get_iterable) == "get_iterable() -> Iterable"
55-
lins = [1, 2, 3]
56-
i = m.get_first_item_from_iterable(lins)
55+
lst = [1, 2, 3]
56+
i = m.get_first_item_from_iterable(lst)
5757
assert i == 1
58-
i = m.get_second_item_from_iterable(lins)
58+
i = m.get_second_item_from_iterable(lst)
5959
assert i == 2
6060

6161

@@ -67,13 +67,13 @@ def test_list(capture, doc):
6767
assert m.list_no_args() == []
6868
assert m.list_ssize_t() == []
6969
assert m.list_size_t() == []
70-
lins = [1, 2]
71-
m.list_insert_ssize_t(lins)
72-
assert lins == [1, 83, 2]
73-
m.list_insert_size_t(lins)
74-
assert lins == [1, 83, 2, 57]
75-
m.list_clear(lins)
76-
assert lins == []
70+
lst = [1, 2]
71+
m.list_insert_ssize_t(lst)
72+
assert lst == [1, 83, 2]
73+
m.list_insert_size_t(lst)
74+
assert lst == [1, 83, 2, 57]
75+
m.list_clear(lst)
76+
assert lst == []
7777

7878
with capture:
7979
lst = m.get_list()

tests/test_smart_ptr.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,8 @@ def test_smart_ptr_from_default():
313313
instance = m.HeldByDefaultHolder()
314314
with pytest.raises(RuntimeError) as excinfo:
315315
m.HeldByDefaultHolder.load_shared_ptr(instance)
316-
assert (
317-
"Unable to load a custom holder type from a "
318-
"default-holder instance" in str(excinfo.value)
316+
assert "Unable to load a custom holder type from a default-holder instance" in str(
317+
excinfo.value
319318
)
320319

321320

0 commit comments

Comments
 (0)