Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix typing
  • Loading branch information
peasoft committed Jan 3, 2026
commit 95d1b4dc642c037f573f62d23018b494168447af
6 changes: 3 additions & 3 deletions msgpack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .fallback import Packer, Unpacker, unpackb


def pack(o: t.Any, stream: t.BinaryIO, **kwargs: dict[str, t.Any]):
def pack(o: t.Any, stream: t.BinaryIO, **kwargs: t.Any):
"""
Pack object `o` and write it to `stream`

Expand All @@ -29,7 +29,7 @@ def pack(o: t.Any, stream: t.BinaryIO, **kwargs: dict[str, t.Any]):
stream.write(t.cast(bytes, packer.pack(o)))


def packb(o: t.Any, **kwargs: dict[str, t.Any]):
def packb(o: t.Any, **kwargs: t.Any) -> bytes:
"""
Pack object `o` and return packed bytes

Expand All @@ -38,7 +38,7 @@ def packb(o: t.Any, **kwargs: dict[str, t.Any]):
return Packer(autoreset=True, **kwargs).pack(o) # type: ignore


def unpack(stream: t.BinaryIO, **kwargs: dict[str, t.Any]):
def unpack(stream: t.BinaryIO, **kwargs: t.Any):
"""
Unpack an object from `stream`.

Expand Down
2 changes: 1 addition & 1 deletion msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _get_data_from_buffer(obj: bytes):
return view


def unpackb(packed: bytes, **kwargs: dict[str, t.Any]):
def unpackb(packed: bytes, **kwargs: t.Any):
"""
Unpack an object from `packed`.

Expand Down