mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
style: pre-commit fixes
This commit is contained in:
parent
a4b246ae07
commit
8b931e0b47
@ -27,18 +27,28 @@ TEST_SUBMODULE(docstring_options, m) {
|
|||||||
m.def("test_overloaded3", [](int) {}, py::arg("i"));
|
m.def("test_overloaded3", [](int) {}, py::arg("i"));
|
||||||
m.def("test_overloaded3", [](double) {}, py::arg("d"), "Overload docstr");
|
m.def("test_overloaded3", [](double) {}, py::arg("d"), "Overload docstr");
|
||||||
|
|
||||||
m.def("test_overloaded4", [](int a, int b)->int { return a + b; },
|
m.def(
|
||||||
|
"test_overloaded4",
|
||||||
|
[](int a, int b) -> int { return a + b; },
|
||||||
"A function which adds two numbers.\n");
|
"A function which adds two numbers.\n");
|
||||||
m.def("test_overloaded4", [](float a, float b)->float { return a + b; },
|
m.def(
|
||||||
|
"test_overloaded4",
|
||||||
|
[](float a, float b) -> float { return a + b; },
|
||||||
"Internally, a simple addition is performed.");
|
"Internally, a simple addition is performed.");
|
||||||
m.def("test_overloaded4", [](const py::none&, const py::none&)->py::none { return py::none(); },
|
m.def(
|
||||||
|
"test_overloaded4",
|
||||||
|
[](const py::none &, const py::none &) -> py::none { return py::none(); },
|
||||||
"Both numbers can be None, and None will be returned.");
|
"Both numbers can be None, and None will be returned.");
|
||||||
|
|
||||||
options.enable_function_signatures();
|
options.enable_function_signatures();
|
||||||
|
|
||||||
m.def("test_overloaded5", [](int a, int b)->int { return a + b; },
|
m.def(
|
||||||
|
"test_overloaded5",
|
||||||
|
[](int a, int b) -> int { return a + b; },
|
||||||
"Add two integers together.");
|
"Add two integers together.");
|
||||||
m.def("test_overloaded5", [](float a, float b)->float { return a + b; },
|
m.def(
|
||||||
|
"test_overloaded5",
|
||||||
|
[](float a, float b) -> float { return a + b; },
|
||||||
"Add two floating point numbers together.");
|
"Add two floating point numbers together.");
|
||||||
|
|
||||||
m.def("test_function3", [](int, int) {}, py::arg("a"), py::arg("b"));
|
m.def("test_function3", [](int, int) {}, py::arg("a"), py::arg("b"));
|
||||||
|
Loading…
Reference in New Issue
Block a user