diff --git a/include/pybind11/typing.h b/include/pybind11/typing.h index 20919c4ab..2763239f4 100644 --- a/include/pybind11/typing.h +++ b/include/pybind11/typing.h @@ -127,9 +127,7 @@ class TypeVar : public object { class NameWrapper : public object { PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type) using object::object; - NameWrapper(const char *name){ - attr("__name__") = name; - } + NameWrapper(const char *name) { attr("__name__") = name; } } template diff --git a/tests/test_pytypes.cpp b/tests/test_pytypes.cpp index aa77a65b0..c1cffd0f6 100644 --- a/tests/test_pytypes.cpp +++ b/tests/test_pytypes.cpp @@ -925,14 +925,16 @@ TEST_SUBMODULE(pytypes, m) { #endif struct TypeVarObject {}; - py::class_(m, "TypeVarObject").type_params() = py::make_tuple(py::typing::TypeVarObject("T")); - + py::class_(m, "TypeVarObject").type_params() + = py::make_tuple(py::typing::TypeVarObject("T")); + struct ParamSpec {}; - py::class_(m, "ParamSpec").type_params() = py::make_tuple(py::typing::ParamSpec("P")); + py::class_(m, "ParamSpec").type_params() + = py::make_tuple(py::typing::ParamSpec("P")); struct TypeVarTuple {}; - py::class_(m, "TypeVarTuple").type_params() = py::make_tuple(py::typing::TypeVarTuple("T")); - + py::class_(m, "TypeVarTuple").type_params() + = py::make_tuple(py::typing::TypeVarTuple("T")); struct NoTypeParams {}; struct TypeParams {};