From 8535cd3f38f5f611b0181be7d5f0a34b36aee2bb Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 29 Aug 2024 01:46:56 -0700 Subject: [PATCH] Remove stray `{}`: ``` /__w/pybind11clif/pybind11clif/tests/test_return_value_policy_pack.cpp:447:73: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init] 447 | py::arg("cb").noconvert().policies(py::return_value_policy_pack({rvpb})), | ^~~~~~ ``` --- tests/test_return_value_policy_pack.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_return_value_policy_pack.cpp b/tests/test_return_value_policy_pack.cpp index dd2f5c12..84da0dce 100644 --- a/tests/test_return_value_policy_pack.cpp +++ b/tests/test_return_value_policy_pack.cpp @@ -444,7 +444,7 @@ TEST_SUBMODULE(return_value_policy_pack, m) { return cb("\x80" "ArgNoconvertPolicies"); }, - py::arg("cb").noconvert().policies(py::return_value_policy_pack({rvpb})), + py::arg("cb").noconvert().policies(py::return_value_policy_pack(rvpb)), rvpb); m.def( "arg_chaining_none_policies", @@ -452,7 +452,7 @@ TEST_SUBMODULE(return_value_policy_pack, m) { return cb("\x80" "ArgNonePolicies"); }, - py::arg("cb").none().policies(py::return_value_policy_pack({rvpb})), + py::arg("cb").none().policies(py::return_value_policy_pack(rvpb)), rvpb); m.def( "arg_chaining_policies_noconvert", @@ -460,7 +460,7 @@ TEST_SUBMODULE(return_value_policy_pack, m) { return cb("\x80" "ArgPoliciesNoconvert"); }, - py::arg("cb").policies(py::return_value_policy_pack({rvpb})).noconvert(), + py::arg("cb").policies(py::return_value_policy_pack(rvpb)).noconvert(), rvpb); // Ensure chaining py::arg_v() member functions works. @@ -480,6 +480,6 @@ TEST_SUBMODULE(return_value_policy_pack, m) { } return std::string(""); }, - (py::arg("cb") = py::none()).policies(py::return_value_policy_pack({rvpb})), + (py::arg("cb") = py::none()).policies(py::return_value_policy_pack(rvpb)), rvpb); }