Fix doc build with extra blank lines
This commit is contained in:
parent
1a82555803
commit
cdad59fbc2
1 changed files with 7 additions and 2 deletions
|
|
@ -41,7 +41,8 @@
|
||||||
//|
|
//|
|
||||||
//| Not implemented: 64-bit int, uint, float.
|
//| Not implemented: 64-bit int, uint, float.
|
||||||
//|
|
//|
|
||||||
//| Example 1:
|
//| Example 1::
|
||||||
|
//|
|
||||||
//| import msgpack
|
//| import msgpack
|
||||||
//| from io import BytesIO
|
//| from io import BytesIO
|
||||||
//|
|
//|
|
||||||
|
|
@ -50,7 +51,7 @@
|
||||||
//| b.seek(0)
|
//| b.seek(0)
|
||||||
//| print(msgpack.unpack(b))
|
//| print(msgpack.unpack(b))
|
||||||
//|
|
//|
|
||||||
//| Example 2: handling objects
|
//| Example 2: handling objects::
|
||||||
//|
|
//|
|
||||||
//| from msgpack import pack, unpack, ExtType
|
//| from msgpack import pack, unpack, ExtType
|
||||||
//| from io import BytesIO
|
//| from io import BytesIO
|
||||||
|
|
@ -78,11 +79,13 @@
|
||||||
//| buffer.seek(0)
|
//| buffer.seek(0)
|
||||||
//| decoded = unpack(buffer, ext_hook=decoder)
|
//| decoded = unpack(buffer, ext_hook=decoder)
|
||||||
//| print(f"{data} -> {buffer.getvalue()} -> {decoded}")
|
//| print(f"{data} -> {buffer.getvalue()} -> {decoded}")
|
||||||
|
//|
|
||||||
//| """
|
//| """
|
||||||
//|
|
//|
|
||||||
|
|
||||||
//| def pack(obj: object, buffer: WriteableBuffer, *, default: Union[Callable[[object], None], None] = None) -> None:
|
//| def pack(obj: object, buffer: WriteableBuffer, *, default: Union[Callable[[object], None], None] = None) -> None:
|
||||||
//| """Ouput object to buffer in msgpack format.
|
//| """Ouput object to buffer in msgpack format.
|
||||||
|
//|
|
||||||
//| :param object obj: Object to convert to msgpack format.
|
//| :param object obj: Object to convert to msgpack format.
|
||||||
//| :param ~_typing.WriteableBuffer buffer: buffer to write into
|
//| :param ~_typing.WriteableBuffer buffer: buffer to write into
|
||||||
//| :param Optional[~_typing.Callable[[object], None]] default:
|
//| :param Optional[~_typing.Callable[[object], None]] default:
|
||||||
|
|
@ -114,10 +117,12 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 1, mod_msgpack_pack);
|
||||||
|
|
||||||
//| def unpack(buffer: ReadableBuffer, *, ext_hook: Union[Callable[[int, bytes], object], None] = None, use_list: bool=True) -> object:
|
//| def unpack(buffer: ReadableBuffer, *, ext_hook: Union[Callable[[int, bytes], object], None] = None, use_list: bool=True) -> object:
|
||||||
//| """Unpack and return one object from buffer.
|
//| """Unpack and return one object from buffer.
|
||||||
|
//|
|
||||||
//| :param ~_typing.ReadableBuffer buffer: buffer to read from
|
//| :param ~_typing.ReadableBuffer buffer: buffer to read from
|
||||||
//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in
|
//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in
|
||||||
//| msgpack ext format.
|
//| msgpack ext format.
|
||||||
//| :param Optional[bool] use_list: return array as list or tuple (use_list=False).
|
//| :param Optional[bool] use_list: return array as list or tuple (use_list=False).
|
||||||
|
//|
|
||||||
//| :return object: object read from buffer.
|
//| :return object: object read from buffer.
|
||||||
//| """
|
//| """
|
||||||
//| ...
|
//| ...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue