aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/pybind/pod.cpp
diff options
context:
space:
mode:
authorsay <say@yandex-team.com>2023-02-14 17:24:43 +0300
committersay <say@yandex-team.com>2023-02-14 17:24:43 +0300
commite0094c4ad6964e11564777bc0d859c68d8aa9de2 (patch)
tree5d2ad1a4df88da1f74385888891a2a5f9fbbc3ef /library/cpp/pybind/pod.cpp
parent65a08c9fdece8dba50da8beb4d7c81447211dd45 (diff)
downloadydb-e0094c4ad6964e11564777bc0d859c68d8aa9de2.tar.gz
Migrate black linter on custom_lint pipeline
Diffstat (limited to 'library/cpp/pybind/pod.cpp')
-rw-r--r--library/cpp/pybind/pod.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/library/cpp/pybind/pod.cpp b/library/cpp/pybind/pod.cpp
new file mode 100644
index 0000000000..3cf030e537
--- /dev/null
+++ b/library/cpp/pybind/pod.cpp
@@ -0,0 +1,18 @@
+#include "pod.h"
+
+namespace NPyBind {
+ class TPODAttrGetter: public TBaseAttrGetter<TPOD> {
+ public:
+ bool GetAttr(PyObject*, const TPOD& self, const TString& attr, PyObject*& res) const override {
+ res = self.GetAttr(attr.c_str());
+ return res != nullptr;
+ }
+ };
+
+ TPODTraits::TPODTraits()
+ : MyParent("TPOD", "simple struct")
+ {
+ AddGetter("", new TPODAttrGetter);
+ }
+
+}