mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
NOLINT reduction (#3096)
* Copying from prework_no_rst branch (PR #3087): test_numpy_array.cpp, test_stl.cpp * Manual changes reducing NOLINTs. * clang-format-diff.py * Minor adjustment to avoid MSVC warning C4702: unreachable code
This commit is contained in:
committed by
GitHub
parent
7a64b8adcc
commit
2d468697d9
@@ -294,20 +294,17 @@ TEST_SUBMODULE(methods_and_attributes, m) {
|
||||
"static_rw_func", py::cpp_function(static_get2, rvp_copy), static_set2)
|
||||
// test_property_rvalue_policy
|
||||
.def_property_readonly("rvalue", &TestPropRVP::get_rvalue)
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
.def_property_readonly_static("static_rvalue", [](py::object) { return UserType(1); });
|
||||
.def_property_readonly_static("static_rvalue",
|
||||
[](const py::object &) { return UserType(1); });
|
||||
|
||||
// test_metaclass_override
|
||||
struct MetaclassOverride { };
|
||||
py::class_<MetaclassOverride>(m, "MetaclassOverride", py::metaclass((PyObject *) &PyType_Type))
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
.def_property_readonly_static("readonly", [](py::object) { return 1; });
|
||||
.def_property_readonly_static("readonly", [](const py::object &) { return 1; });
|
||||
|
||||
// test_overload_ordering
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
m.def("overload_order", [](std::string) { return 1; });
|
||||
// NOLINTNEXTLINE(performance-unnecessary-value-param)
|
||||
m.def("overload_order", [](std::string) { return 2; });
|
||||
m.def("overload_order", [](const std::string &) { return 1; });
|
||||
m.def("overload_order", [](const std::string &) { return 2; });
|
||||
m.def("overload_order", [](int) { return 3; });
|
||||
m.def("overload_order", [](int) { return 4; }, py::prepend{});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user