aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/pybind/pod.cpp
diff options
context:
space:
mode:
authorprettyboy <prettyboy@yandex-team.com>2023-09-08 00:22:12 +0300
committerprettyboy <prettyboy@yandex-team.com>2023-09-08 00:46:04 +0300
commit3a6cd865171eed9b89bf536cd242285f8b583a91 (patch)
tree25e2756c125f7484fb118e0d5724212199662389 /library/cpp/pybind/pod.cpp
parent67f3f216950849664a29035458cfaa5d12a62846 (diff)
downloadydb-3a6cd865171eed9b89bf536cd242285f8b583a91.tar.gz
[build/plugins/ytest] Allow prebuilt linters for opensource
Без этого, ydb или не сможет запускать flake8 с помощью ya make. Или к ним поедет сборка flake8. Возможно последнее и не так плохо, но сейчас предлагается пока так
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);
+ }
+
+}