diff options
author | say <say@yandex-team.com> | 2023-03-31 10:07:15 +0300 |
---|---|---|
committer | say <say@yandex-team.com> | 2023-03-31 10:07:15 +0300 |
commit | e163b69a87c70baac07bd99142916735e0c283fa (patch) | |
tree | 73e22c0f9e975ff6dc70f38534ec84588587d25c /library/cpp/pybind/v2.cpp | |
parent | 6be8bf780352147bcac5afec43505883b69229a0 (diff) | |
download | ydb-e163b69a87c70baac07bd99142916735e0c283fa.tar.gz |
Swith flake8 to custom lint schema
Diffstat (limited to 'library/cpp/pybind/v2.cpp')
-rw-r--r-- | library/cpp/pybind/v2.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/library/cpp/pybind/v2.cpp b/library/cpp/pybind/v2.cpp deleted file mode 100644 index edce0be7195..00000000000 --- a/library/cpp/pybind/v2.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "v2.h" -namespace NPyBind { - namespace Detail { - template <> - PyTypeObject* GetParentType<void>(const TPyModuleDefinition&) { - return nullptr; - } - - - template <bool InitEnabled> - void UpdateClassNamesInModule(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType) { - if (!InitEnabled) { - return; - } - M.ClassName2Type[name] = pythonType; - } - - template <bool InitEnabled> - void UpdateGetContextInModule(TPyModuleDefinition& M, const TString& name, IGetContextBase* base) { - if (!InitEnabled) { - return; - } - M.Class2ContextGetter[name] = base; - } - - TPyModuleRegistry::TPyModuleRegistry() { -#if PY_MAJOR_VERSION >= 3 - NPrivate::AddFinalizationCallBack([this]() { - if (UnnamedModule) { - UnnamedModule.Clear(); - } - Name2Def.clear(); - }); -#endif - } - template void UpdateClassNamesInModule<false>(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType); - template void UpdateClassNamesInModule<true>(TPyModuleDefinition& M, const TString& name, PyTypeObject* pythonType); - - - template void UpdateGetContextInModule<false>(TPyModuleDefinition& M, const TString& name, IGetContextBase* pythonType); - template void UpdateGetContextInModule<true>(TPyModuleDefinition& M, const TString& name, IGetContextBase* pythonType); - }//Detail -}//NPyBind |