Skip to content

Commit 9903c9e

Browse files
committed
fixed (?) typespec for callback functions
1 parent 5875a27 commit 9903c9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/msgpack/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
//| """Ouput object to buffer in msgpack format.
8686
//| :param object obj: Object to convert to msgpack format.
8787
//| :param ~_typing.WriteableBuffer buffer: buffer to write into
88-
//| :param Optional[~_typing.Function] default:
88+
//| :param Optional[~_typing.Callable[[object], None]] default:
8989
//| function called for python objects that do not have
9090
//| a representation in msgpack format.
9191
//| """
@@ -113,7 +113,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 1, mod_msgpack_pack);
113113
//| def unpack(buffer: ReadableBuffer, *, ext_hook: Function=None, use_list: bool=True) -> object:
114114
//| """Unpack and return one object from buffer.
115115
//| :param ~_typing.ReadableBuffer buffer: buffer to read from
116-
//| :param Optional[~_typing.Function] ext_hook: function called for objects in
116+
//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in
117117
//| msgpack ext format.
118118
//| :param Optional[bool] use_list: return array as list or tuple (use_list=False).
119119
//| :return object: object read from buffer.

0 commit comments

Comments
 (0)