Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 4, 2025
1 parent 69dbbe6 commit d8ca336
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def pytest_configure():

def pytest_report_header(config):
del config # Unused.
assert (
pybind11_tests.compiler_info is not None
), "Please update pybind11_tests.cpp if this assert fails."
assert pybind11_tests.compiler_info is not None, (
"Please update pybind11_tests.cpp if this assert fails."
)
return (
"C++ Info:"
f" {pybind11_tests.compiler_info}"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_eigen_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ def test_eigen_ref_to_python():
chols = [m.cholesky1, m.cholesky2, m.cholesky3, m.cholesky4]
for i, chol in enumerate(chols, start=1):
mymat = chol(np.array([[1.0, 2, 4], [2, 13, 23], [4, 23, 77]]))
assert np.all(
mymat == np.array([[1, 0, 0], [2, 3, 0], [4, 5, 6]])
), f"cholesky{i}"
assert np.all(mymat == np.array([[1, 0, 0], [2, 3, 0], [4, 5, 6]])), (
f"cholesky{i}"
)


def assign_both(a1, a2, r, c, v):
Expand Down
5 changes: 2 additions & 3 deletions tests/test_smart_ptr.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,8 @@ def test_smart_ptr_from_default():
instance = m.HeldByDefaultHolder()
with pytest.raises(RuntimeError) as excinfo:
m.HeldByDefaultHolder.load_shared_ptr(instance)
assert (
"Unable to load a custom holder type from a "
"default-holder instance" in str(excinfo.value)
assert "Unable to load a custom holder type from a default-holder instance" in str(
excinfo.value
)


Expand Down

0 comments on commit d8ca336

Please sign in to comment.