Replies: 1 comment
-
It's annoying how |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I define an enum like so:
In addition, I have a function binding declare like this:
The type stub for the input_text function becomes:
I was expecting the above to be
Fortunately, I can fix this by declaring the flags argument like this:
"flags"_a.sig("InputTextFlags.NONE") = ImGuiInputTextFlags_None
.But is this actually a bug in how the stubs get rendered? According to the Nanobind docs on arg &sig(const char *sig), the signature would be rendered with
str(value)
: "Override the signature of the default argument value. This is useful when the argument value is unusually complex so that the default method to explain it in docstrings and stubs (str(value)) does not produce acceptable output."And actually if I use
str()
to render the NONE field, I get the expected output:Beta Was this translation helpful? Give feedback.
All reactions