From 8214dad571845bfe967960d75ed9ecbd518b4035 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:40:01 +0000 Subject: [PATCH] style: pre-commit fixes --- include/pybind11/typing.h | 4 ++-- tests/test_pytypes.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/pybind11/typing.h b/include/pybind11/typing.h index 84baeb3f3..83d73bc92 100644 --- a/include/pybind11/typing.h +++ b/include/pybind11/typing.h @@ -136,8 +136,8 @@ class TypeVarObject : public object { using object::object; TypeVarObject(const char *name) { attr("__name__") = name; - attr("__bound__") = object() - attr("__bound__").attr("__name__") = pybind11::detail::make_caster::name; + attr("__bound__") = object() attr("__bound__").attr("__name__") + = pybind11::detail::make_caster::name; attr("__constraints__") = pybind11::make_tuple(); } // TypeVarObject(const char *name, py::typing::Tuple tuple){ diff --git a/tests/test_pytypes.py b/tests/test_pytypes.py index 0fb78451c..59b574ba3 100644 --- a/tests/test_pytypes.py +++ b/tests/test_pytypes.py @@ -1057,7 +1057,6 @@ def test_typevar_object(): assert type_var.__bound__ == None assert type_var.__constraints__ == () - assert len(m.TypeVarObjectBound.__type_params__) == 1 type_var = m.TypeVarObjectBound.__type_params__[0] assert type_var.__name__ == "T"