mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix: Render py::function as Callable (#4829)
* fix: Render `py::function` as `Callable` * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -216,3 +216,10 @@ def test_custom_func():
|
||||
def test_custom_func2():
|
||||
assert m.custom_function2(3) == 27
|
||||
assert m.roundtrip(m.custom_function2)(3) == 27
|
||||
|
||||
|
||||
def test_callback_docstring():
|
||||
assert (
|
||||
m.test_tuple_unpacking.__doc__.strip()
|
||||
== "test_tuple_unpacking(arg0: Callable) -> object"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user