mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-30 08:57:11 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
38d23b9137
@ -898,6 +898,10 @@ struct handle_type_name<float_> {
|
|||||||
static constexpr auto name = const_name("float");
|
static constexpr auto name = const_name("float");
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
|
struct handle_type_name<function> {
|
||||||
|
static constexpr auto name = const_name("Callable");
|
||||||
|
};
|
||||||
|
template <>
|
||||||
struct handle_type_name<none> {
|
struct handle_type_name<none> {
|
||||||
static constexpr auto name = const_name("None");
|
static constexpr auto name = const_name("None");
|
||||||
};
|
};
|
||||||
|
@ -216,3 +216,10 @@ def test_custom_func():
|
|||||||
def test_custom_func2():
|
def test_custom_func2():
|
||||||
assert m.custom_function2(3) == 27
|
assert m.custom_function2(3) == 27
|
||||||
assert m.roundtrip(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"
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user