From 960d4bcd95856546685734f84b489c3ca6abb8ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:22:40 +0000 Subject: [PATCH] style: pre-commit fixes --- include/pybind11/typing.h | 4 +--- tests/test_pytypes.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) 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 {};