From 72e99f90d3e6c06dc0829e1e1254fd890826f645 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 08:35:43 +0000 Subject: [PATCH] style: pre-commit fixes --- include/pybind11/typing.h | 3 ++- tests/test_pytypes.cpp | 3 ++- tests/test_pytypes.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/pybind11/typing.h b/include/pybind11/typing.h index 156b103d664..0ee329d85ae 100644 --- a/include/pybind11/typing.h +++ b/include/pybind11/typing.h @@ -82,7 +82,8 @@ struct handle_type_name> { template struct handle_type_name> { // PEP 484 specifies this syntax for a variable-length tuple - static constexpr auto name = const_name("tuple[") + make_caster::name + const_name(", ...]"); + static constexpr auto name + = const_name("tuple[") + make_caster::name + const_name(", ...]"); }; template diff --git a/tests/test_pytypes.cpp b/tests/test_pytypes.cpp index 7db08f84a2f..e840eb61f81 100644 --- a/tests/test_pytypes.cpp +++ b/tests/test_pytypes.cpp @@ -825,7 +825,8 @@ TEST_SUBMODULE(pytypes, m) { m.def("annotate_tuple_float_str", [](const py::typing::Tuple &) {}); m.def("annotate_tuple_empty", [](const py::typing::Tuple<> &) {}); - m.def("annotate_tuple_variable_length", [](const py::typing::Tuple &) {}); + m.def("annotate_tuple_variable_length", + [](const py::typing::Tuple &) {}); m.def("annotate_dict_str_int", [](const py::typing::Dict &) {}); m.def("annotate_list_int", [](const py::typing::List &) {}); m.def("annotate_set_str", [](const py::typing::Set &) {}); diff --git a/tests/test_pytypes.py b/tests/test_pytypes.py index fad1e403fba..cfb144523a8 100644 --- a/tests/test_pytypes.py +++ b/tests/test_pytypes.py @@ -913,7 +913,8 @@ def test_tuple_empty_annotations(doc): def test_tuple_variable_length_annotations(doc): assert ( - doc(m.annotate_tuple_variable_length) == "annotate_tuple_variable_length(arg0: tuple[float, ...]) -> None" + doc(m.annotate_tuple_variable_length) + == "annotate_tuple_variable_length(arg0: tuple[float, ...]) -> None" )