Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 16, 2024
1 parent a4b246a commit 8b931e0
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 @@ -27,18 +27,28 @@ TEST_SUBMODULE(docstring_options, m) {
m.def("test_overloaded3", [](int) {}, py::arg("i"));
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");
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.");
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.");

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.");
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.");

m.def("test_function3", [](int, int) {}, py::arg("a"), py::arg("b"));
Expand Down

0 comments on commit 8b931e0

Please sign in to comment.