Skip to content

Commit 05c810a

Browse files
author
Matevz Morato
committed
Clangformat
1 parent b823bc9 commit 05c810a

File tree

17 files changed

+34
-37
lines changed

17 files changed

+34
-37
lines changed

bindings/python/src/XLinkBindings.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#include <cstring>
88

99
// depthai
10+
#include "depthai/utility/CompilerWarnings.hpp"
1011
#include "depthai/xlink/XLinkConnection.hpp"
1112
#include "depthai/xlink/XLinkStream.hpp"
12-
#include "depthai/utility/CompilerWarnings.hpp"
1313

1414
void XLinkBindings::bind(pybind11::module& m, void* pCallstack) {
1515
using namespace dai;
@@ -60,7 +60,9 @@ void XLinkBindings::bind(pybind11::module& m, void* pCallstack) {
6060
DOC(dai, DeviceInfo, DeviceInfo, 2))
6161
.def(py::init<std::string>(), py::arg("deviceIdOrName"), DOC(dai, DeviceInfo, DeviceInfo, 3))
6262
.def(py::init<const deviceDesc_t&>(), DOC(dai, DeviceInfo, DeviceInfo, 4))
63-
.def("getMxId", [](DeviceInfo& info) {
63+
.def(
64+
"getMxId",
65+
[](DeviceInfo& info) {
6466
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
6567
PyErr_WarnEx(PyExc_DeprecationWarning, "getMxId is deprecated, use getDeviceId instead.", 1);
6668
return info.getMxId();

bindings/python/src/modelzoo/ZooBindings.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ void ZooBindings::bind(pybind11::module& m, void* pCallstack) {
8686
py::arg("modelPrecisionType") = "")
8787

8888
.def(py::init<>([](const std::string& model) { return NNModelDescription{model}; }), py::arg("model"))
89-
.def_static("fromYamlFile", &NNModelDescription::fromYamlFile, py::arg("yamlPath"), py::arg("modelsPath") = "", DOC(dai, NNModelDescription, fromYamlFile))
89+
.def_static(
90+
"fromYamlFile", &NNModelDescription::fromYamlFile, py::arg("yamlPath"), py::arg("modelsPath") = "", DOC(dai, NNModelDescription, fromYamlFile))
9091
.def("saveToYamlFile", &NNModelDescription::saveToYamlFile, py::arg("yamlPath"), DOC(dai, NNModelDescription, saveToYamlFile))
9192
.def("check", &NNModelDescription::check, DOC(dai, NNModelDescription, check))
9293
.def("toString", &NNModelDescription::toString, DOC(dai, NNModelDescription, toString))

bindings/python/src/pipeline/node/BasaltVIOBindings.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ void bind_basaltnode(pybind11::module& m, void* pCallstack) {
2727
///////////////////////////////////////////////////////////////////////
2828
///////////////////////////////////////////////////////////////////////
2929
// BasaltVIO Node
30-
basaltNode
31-
.def_property_readonly(
32-
"left", [](BasaltVIO& node) { return &node.left; }, py::return_value_policy::reference_internal)
30+
basaltNode.def_property_readonly(
31+
"left", [](BasaltVIO& node) { return &node.left; }, py::return_value_policy::reference_internal)
3332
.def_property_readonly(
3433
"right", [](BasaltVIO& node) { return &node.right; }, py::return_value_policy::reference_internal)
3534
.def_readonly("imu", &BasaltVIO::imu, DOC(dai, node, BasaltVIO, imu))

bindings/python/src/pipeline/node/ImageManipV2Bindings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ void bind_imagemanipv2(pybind11::module& m, void* pCallstack) {
2929
.value("LOW_POWER", ImageManipV2::PerformanceMode::LOW_POWER);
3030

3131
py::enum_<ImageManipV2::Backend> backend(imageManip, "Backend");
32-
backend.value("HW", ImageManipV2::Backend::HW)
33-
.value("CPU", ImageManipV2::Backend::CPU);
32+
backend.value("HW", ImageManipV2::Backend::HW).value("CPU", ImageManipV2::Backend::CPU);
3433

3534
// ImageManip Node
3635
imageManip.def_readonly("inputConfig", &ImageManipV2::inputConfig, DOC(dai, node, ImageManipV2, inputConfig))

bindings/python/src/pipeline/node/NodeBindings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ py::class_<Map, holder_type> bindNodeMap(py::handle scope, const std::string& na
7070
// Register stream insertion operator (if possible)
7171
detail::map_if_insertion_operator<Map, Class_>(cl, name);
7272

73-
cl.def(
74-
"__bool__", [](const Map& m) -> bool { return !m.empty(); }, "Check whether the map is nonempty");
73+
cl.def("__bool__", [](const Map& m) -> bool { return !m.empty(); }, "Check whether the map is nonempty");
7574

7675
cl.def(
7776
"__iter__", [](Map& m) { return make_key_iterator(m.begin(), m.end()); }, keep_alive<0, 1>() /* Essential: keep list alive while iterator exists */

bindings/python/src/pipeline/node/RGBDBindings.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ void bind_rgbd(pybind11::module& m, void* pCallstack) {
2929
///////////////////////////////////////////////////////////////////////
3030

3131
// RGBD Node
32-
rgbdNode
33-
.def_property_readonly(
34-
"inColor", [](RGBD& node) { return &node.inColor; }, py::return_value_policy::reference_internal)
32+
rgbdNode.def_property_readonly(
33+
"inColor", [](RGBD& node) { return &node.inColor; }, py::return_value_policy::reference_internal)
3534
.def_property_readonly(
3635
"inDepth", [](RGBD& node) { return &node.inDepth; }, py::return_value_policy::reference_internal)
3736
.def_readonly("pcl", &RGBD::pcl, DOC(dai, node, RGBD, pcl))

bindings/python/src/pipeline/node/RTABMapSLAMBindings.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ void bind_rtabmapslamnode(pybind11::module& m, void* pCallstack) {
2828
///////////////////////////////////////////////////////////////////////
2929

3030
// RTABMapSLAM Node
31-
rtabmapSLAMNode
32-
.def_property_readonly(
33-
"rect", [](RTABMapSLAM& node) { return &node.rect; }, py::return_value_policy::reference_internal)
31+
rtabmapSLAMNode.def_property_readonly(
32+
"rect", [](RTABMapSLAM& node) { return &node.rect; }, py::return_value_policy::reference_internal)
3433
.def_property_readonly(
3534
"depth", [](RTABMapSLAM& node) { return &node.depth; }, py::return_value_policy::reference_internal)
3635
.def_readonly("features", &RTABMapSLAM::features, DOC(dai, node, RTABMapSLAM, features))

bindings/python/src/pipeline/node/RTABMapVIOBindings.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ void bind_rtabmapvionode(pybind11::module& m, void* pCallstack) {
2828
///////////////////////////////////////////////////////////////////////
2929

3030
// RTABMapVIO Node
31-
rtabmapVIONode
32-
.def_property_readonly(
33-
"rect", [](RTABMapVIO& node) { return &node.rect; }, py::return_value_policy::reference_internal)
31+
rtabmapVIONode.def_property_readonly(
32+
"rect", [](RTABMapVIO& node) { return &node.rect; }, py::return_value_policy::reference_internal)
3433
.def_property_readonly(
3534
"depth", [](RTABMapVIO& node) { return &node.depth; }, py::return_value_policy::reference_internal)
3635
.def_readonly("imu", &RTABMapVIO::imu, DOC(dai, node, RTABMapVIO, imu))

bindings/python/src/pipeline/node/StereoDepthBindings.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ void bind_stereodepth(pybind11::module& m, void* pCallstack) {
7272
&StereoDepthProperties::depthAlignmentUseSpecTranslation,
7373
DOC(dai, StereoDepthProperties, depthAlignmentUseSpecTranslation))
7474
.def_readwrite("alphaScaling", &StereoDepthProperties::alphaScaling, DOC(dai, StereoDepthProperties, alphaScaling));
75-
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
76-
stereoDepthPresetMode
75+
DEPTHAI_BEGIN_SUPPRESS_DEPRECATION_WARNING
76+
stereoDepthPresetMode
7777
.value("HIGH_ACCURACY", StereoDepth::PresetMode::HIGH_ACCURACY, "**Deprecated:** Will be removed in future releases and replaced with DEFAULT")
7878
.value("HIGH_DENSITY", StereoDepth::PresetMode::HIGH_DENSITY, "**Deprecated:** Will be removed in future releases and replaced with DEFAULT")
7979
.value("DEFAULT", StereoDepth::PresetMode::DEFAULT)
@@ -88,14 +88,11 @@ void bind_stereodepth(pybind11::module& m, void* pCallstack) {
8888
return StereoDepth::PresetMode::HIGH_ACCURACY;
8989
})
9090

91-
.def_property_readonly_static(
92-
"HIGH_DENSITY",
93-
[](py::object) {
94-
PyErr_WarnEx(PyExc_DeprecationWarning, "HIGH_DENSITY is deprecated, will be removed in future releases and replaced with DEFAULT.", 1);
95-
return StereoDepth::PresetMode::HIGH_DENSITY;
96-
})
97-
;
98-
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
91+
.def_property_readonly_static("HIGH_DENSITY", [](py::object) {
92+
PyErr_WarnEx(PyExc_DeprecationWarning, "HIGH_DENSITY is deprecated, will be removed in future releases and replaced with DEFAULT.", 1);
93+
return StereoDepth::PresetMode::HIGH_DENSITY;
94+
});
95+
DEPTHAI_END_SUPPRESS_DEPRECATION_WARNING
9996

10097
// Node
10198
stereoDepth

0 commit comments

Comments
 (0)