diff options
author | say <say@yandex-team.com> | 2023-02-14 17:24:43 +0300 |
---|---|---|
committer | say <say@yandex-team.com> | 2023-02-14 17:24:43 +0300 |
commit | e0094c4ad6964e11564777bc0d859c68d8aa9de2 (patch) | |
tree | 5d2ad1a4df88da1f74385888891a2a5f9fbbc3ef /library/cpp/pybind/pod.cpp | |
parent | 65a08c9fdece8dba50da8beb4d7c81447211dd45 (diff) | |
download | ydb-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.cpp | 18 |
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); + } + +} |