-
As shown in the demo repo https://github.com/metab0t/nanobind_stubgen_demo If I use enum defined in an extension module The enum is at https://github.com/metab0t/nanobind_stubgen_demo/blob/835e92156a44838b55df03007ce565662c0403b7/src/enum.hpp#L3-L6 and exported at https://github.com/metab0t/nanobind_stubgen_demo/blob/835e92156a44838b55df03007ce565662c0403b7/src/nanobind_example_ext.cpp#L12-L15 Used as default argument value at https://github.com/metab0t/nanobind_stubgen_demo/blob/835e92156a44838b55df03007ce565662c0403b7/src/nanobind_example_ext2.cpp#L9 The Is there some way to import other extension modules when generating stubs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It will be great to have an additional argument to specify the dependent extension module to import as prelude. |
Beta Was this translation helpful? Give feedback.
In this case, your extension itself should import the other one. See
nb::module_::import_("...")