Skip to content

Commit 72e99f9

Browse files
style: pre-commit fixes
1 parent 05c42bd commit 72e99f9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

include/pybind11/typing.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ struct handle_type_name<typing::Tuple<>> {
8282
template <typename T>
8383
struct handle_type_name<typing::Tuple<T, ellipsis>> {
8484
// PEP 484 specifies this syntax for a variable-length tuple
85-
static constexpr auto name = const_name("tuple[") + make_caster<T>::name + const_name(", ...]");
85+
static constexpr auto name
86+
= const_name("tuple[") + make_caster<T>::name + const_name(", ...]");
8687
};
8788

8889
template <typename K, typename V>

tests/test_pytypes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,8 @@ TEST_SUBMODULE(pytypes, m) {
825825

826826
m.def("annotate_tuple_float_str", [](const py::typing::Tuple<py::float_, py::str> &) {});
827827
m.def("annotate_tuple_empty", [](const py::typing::Tuple<> &) {});
828-
m.def("annotate_tuple_variable_length", [](const py::typing::Tuple<py::float_, py::ellipsis> &) {});
828+
m.def("annotate_tuple_variable_length",
829+
[](const py::typing::Tuple<py::float_, py::ellipsis> &) {});
829830
m.def("annotate_dict_str_int", [](const py::typing::Dict<py::str, int> &) {});
830831
m.def("annotate_list_int", [](const py::typing::List<int> &) {});
831832
m.def("annotate_set_str", [](const py::typing::Set<std::string> &) {});

tests/test_pytypes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,8 @@ def test_tuple_empty_annotations(doc):
913913

914914
def test_tuple_variable_length_annotations(doc):
915915
assert (
916-
doc(m.annotate_tuple_variable_length) == "annotate_tuple_variable_length(arg0: tuple[float, ...]) -> None"
916+
doc(m.annotate_tuple_variable_length)
917+
== "annotate_tuple_variable_length(arg0: tuple[float, ...]) -> None"
917918
)
918919

919920

0 commit comments

Comments
 (0)