feat(types): add support for Typing.Callable Special Case (#5202)

* Add special case

* linty
This commit is contained in:
Michael Carlstrom
2024-06-26 16:34:06 -04:00
committed by GitHub
parent 2e35470cff
commit 4bd538a40a
3 changed files with 16 additions and 0 deletions

View File

@@ -865,6 +865,7 @@ TEST_SUBMODULE(pytypes, m) {
m.def("annotate_fn",
[](const py::typing::Callable<int(py::typing::List<py::str>, py::str)> &) {});
m.def("annotate_fn_only_return", [](const py::typing::Callable<int(py::ellipsis)> &) {});
m.def("annotate_type", [](const py::typing::Type<int> &t) -> py::type { return t; });
m.def("annotate_union",