Add more readability tidy rules (#5924)

* Apply clang-tidy readibility fixes

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>

* Add checks

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>

* More fixes

Signed-off-by: cyy <cyyever@outlook.com>

---------

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
Yuanyuan Chen
2025-12-09 01:36:51 +08:00
committed by GitHub
parent 6651530963
commit 3ebbecb8af
16 changed files with 36 additions and 37 deletions

View File

@@ -367,7 +367,7 @@ TEST_SUBMODULE(builtin_casters, m) {
m.def("complex_noconvert", [](std::complex<float> x) { return x; }, py::arg{}.noconvert());
// test int vs. long (Python 2)
m.def("int_cast", []() { return (int) 42; });
m.def("int_cast", []() { return 42; });
m.def("long_cast", []() { return (long) 42; });
m.def("longlong_cast", []() { return ULLONG_MAX; });