We have an embedded python interpreter in C++ MFC application.
The issue is when I request a help of a wrapped C++ lambda function I see ellipsis in arguments:
help(my_module.test)
prints:
test(...) method of builtins.PyCapsule instance
some description of function
while expected something like
test(x1 : double) -> double
some description of function
Here is a definition of this function:
PYBIND11_EMBEDDED_MODULE(my_module, m)
{
py::options options;
//options.disable_function_signatures(); // here is a tricky point
m.doc() = "some test module";
m.def("test", [](double x1) { return x1; }, "some description of function", py::arg("x1"));
}
When I uncomment options.disable_function_signatures()
in the module it creates a signature additionally to the one already exist:
test(...) method of builtins.PyCapsule instance
test(x1 : float) -> float
some description of function
A signature created by pybind11 considers my "double" as a "float".
When I generate an html documentation using pdoc I've got:
test(unknown)
test(x1 : float) -> float
some description of function
which is not representative.
I feel that there is a pybind11 conversion issue but don't know how to fix it.. Any help is appreciated.