From 2376f6e953ea2d2fb3a4604f28e6d112e08e57af Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 14 Nov 2023 23:46:42 -0800 Subject: [PATCH] Use py::handle instead of py::object to avoid clang-tidy errors. --- tests/test_cases_for_stubgen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_cases_for_stubgen.cpp b/tests/test_cases_for_stubgen.cpp index 6e8128648..e084ea272 100644 --- a/tests/test_cases_for_stubgen.cpp +++ b/tests/test_cases_for_stubgen.cpp @@ -106,13 +106,13 @@ void bind_basics(py::module &basics) { [](Point &self) { return self.y; }, [](Point &self, double value) { self.y = value; }) .def_property_readonly("length", &Point::length) - .def_property_readonly_static("x_axis", [](py::object /*cls*/) { return Point::x_axis; }) - .def_property_readonly_static("y_axis", [](py::object /*cls*/) { return Point::y_axis; }) + .def_property_readonly_static("x_axis", [](py::handle /*cls*/) { return Point::x_axis; }) + .def_property_readonly_static("y_axis", [](py::handle /*cls*/) { return Point::y_axis; }) .def_readwrite_static("length_unit", &Point::length_unit) .def_property_static( "angle_unit", - [](py::object & /*cls*/) { return Point::angle_unit; }, - [](py::object & /*cls*/, Point::AngleUnit value) { Point::angle_unit = value; }); + [](py::handle /*cls*/) { return Point::angle_unit; }, + [](py::handle /*cls*/, Point::AngleUnit value) { Point::angle_unit = value; }); pyPoint.attr("origin") = Point::origin;