Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 31, 2022
1 parent a264547 commit 9fa1e69
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/test_docstring_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,30 @@ TEST_SUBMODULE(docstring_options, m) {
"This is a property docstring");
}

m.def("test_overloaded4", [](int a, int b)->int { return a + b; },
m.def(
"test_overloaded4",
[](int a, int b) -> int { return a + b; },
"Add two integers together.");
m.def("test_overloaded4", [](float a, float b)->float { return a + b; },
m.def(
"test_overloaded4",
[](float a, float b) -> float { return a + b; },
"Add two floating point numbers together.");

{
py::options options;
options.disable_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; },
"A function which adds two numbers.\n");
m.def("test_overloaded5", [](float a, float b)->float { return a + b; },
m.def(
"test_overloaded5",
[](float a, float b) -> float { return a + b; },
"Internally, a simple addition is performed.");
m.def("test_overloaded5", [](const py::none&, const py::none&)->py::none { return py::none(); },
m.def(
"test_overloaded5",
[](const py::none &, const py::none &) -> py::none { return py::none(); },
"Both numbers can be None, and None will be returned.");
}
}

0 comments on commit 9fa1e69

Please sign in to comment.