Skip to content

Commit 58f2eec

Browse files
Merge branch 'pybind:master' into master
2 parents d36d62c + d2e7e8c commit 58f2eec

6 files changed

+27
-24
lines changed

Diff for: .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

Diff for: 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}"

Diff for: 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):

Diff for: tests/test_gil_scoped.py

+4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def test_nested_acquire():
108108

109109

110110
@pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
111+
@pytest.mark.skipif(
112+
env.GRAALPY and sys.platform == "darwin",
113+
reason="Transiently crashes on GraalPy on OS X",
114+
)
111115
def test_multi_acquire_release_cross_module():
112116
for bits in range(16 * 8):
113117
internals_ids = m.test_multi_acquire_release_cross_module(bits)

Diff for: 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()

Diff for: 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)