16 options.disable_function_signatures();
19 m.def(
"test_function2", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
21 m.def(
"test_overloaded1", [](
int) {},
py::arg(
"i"),
"Overload docstring");
22 m.def(
"test_overloaded1", [](
double) {},
py::arg(
"d"));
24 m.def(
"test_overloaded2", [](
int) {},
py::arg(
"i"),
"overload docstring 1");
25 m.def(
"test_overloaded2", [](
double) {},
py::arg(
"d"),
"overload docstring 2");
27 m.def(
"test_overloaded3", [](
int) {},
py::arg(
"i"));
28 m.def(
"test_overloaded3", [](
double) {},
py::arg(
"d"),
"Overload docstr");
30 options.enable_function_signatures();
33 m.def(
"test_function4", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
35 options.disable_function_signatures().disable_user_defined_docstrings();
37 m.def(
"test_function5", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
41 nested_options.enable_user_defined_docstrings();
42 m.def(
"test_function6", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
46 m.def(
"test_function7", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
50 options.disable_user_defined_docstrings();
52 struct DocstringTestFoo {
54 void setValue(
int v) { value =
v; }
55 int getValue()
const {
return value; }
57 py::class_<DocstringTestFoo>(
m,
"DocstringTestFoo",
"This is a class docstring")
58 .def_property(
"value_prop", &DocstringTestFoo::getValue, &DocstringTestFoo::setValue,
"This is a property docstring")
idx_t idx_t idx_t idx_t idx_t idx_t idx_t real_t real_t idx_t * options
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
TEST_SUBMODULE(docstring_options, m)