Inject custom typing information into module #937
ingomueller-net
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I guess one work-around is, instead of using the CMake rule, to generate the stub by hand and then modify it. But manually modifying generated code isn't a great process... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am running into a case where I am adding a class to a module manually (via
mlir_type_subclass
in llvm/llvm-project#127518).stubgen
does not generate anything for that class in the*.pyi
file generated by the recommended CMake rule, sopyright
complains about a non-existent class. What's the recommended way to deal with this?One solution I imagine is the possibility to inject hand-written code into a module exposed by nanobind. This seems similar to
nb::sig
, which allows to override something thatstubgen
doesn't handle out of the box.Beta Was this translation helpful? Give feedback.
All reactions