16 options.disable_function_signatures();
21 "test_function2", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
24 "test_overloaded1", [](
int) {},
py::arg(
"i"),
"Overload docstring");
26 "test_overloaded1", [](
double) {},
py::arg(
"d"));
29 "test_overloaded2", [](
int) {},
py::arg(
"i"),
"overload docstring 1");
31 "test_overloaded2", [](
double) {},
py::arg(
"d"),
"overload docstring 2");
34 "test_overloaded3", [](
int) {},
py::arg(
"i"));
36 "test_overloaded3", [](
double) {},
py::arg(
"d"),
"Overload docstr");
38 options.enable_function_signatures();
43 "test_function4", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
45 options.disable_function_signatures().disable_user_defined_docstrings();
48 "test_function5", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
52 nested_options.enable_user_defined_docstrings();
58 "A custom docstring");
63 "test_function7", [](
int,
int) {},
py::arg(
"a"),
py::arg(
"b"),
"A custom docstring");
67 options.disable_user_defined_docstrings();
68 options.disable_function_signatures();
70 m.def(
"test_function8", []() {});
75 options.disable_user_defined_docstrings();
77 struct DocstringTestFoo {
79 void setValue(
int v) { value =
v; }
80 int getValue()
const {
return value; }
82 py::class_<DocstringTestFoo>(
m,
"DocstringTestFoo",
"This is a class docstring")
83 .def_property(
"value_prop",
84 &DocstringTestFoo::getValue,
85 &DocstringTestFoo::setValue,
86 "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
Array< int, Dynamic, 1 > v
TEST_SUBMODULE(docstring_options, m)