mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
feat(types): add support for Typing.Callable Special Case (#5202)
* Add special case * linty
This commit is contained in:
committed by
GitHub
parent
2e35470cff
commit
4bd538a40a
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user