File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -898,6 +898,10 @@ struct handle_type_name<float_> {
898
898
static constexpr auto name = const_name(" float" );
899
899
};
900
900
template <>
901
+ struct handle_type_name <function> {
902
+ static constexpr auto name = const_name(" Callable" );
903
+ };
904
+ template <>
901
905
struct handle_type_name <none> {
902
906
static constexpr auto name = const_name(" None" );
903
907
};
Original file line number Diff line number Diff line change @@ -216,3 +216,10 @@ def test_custom_func():
216
216
def test_custom_func2 ():
217
217
assert m .custom_function2 (3 ) == 27
218
218
assert m .roundtrip (m .custom_function2 )(3 ) == 27
219
+
220
+
221
+ def test_callback_docstring ():
222
+ assert (
223
+ m .test_tuple_unpacking .__doc__ .strip ()
224
+ == "test_tuple_unpacking(arg0: Callable) -> object"
225
+ )
You can’t perform that action at this time.
0 commit comments