From 17e12e5180f34a07de40448a3a7b74f8811adae8 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Sat, 13 Jun 2026 00:59:18 +0000 Subject: [PATCH] Fixed typing. --- kanta/serialization/json.py | 4 ++-- kanta/serialization/msgpack.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kanta/serialization/json.py b/kanta/serialization/json.py index 9241ab7..8673fda 100644 --- a/kanta/serialization/json.py +++ b/kanta/serialization/json.py @@ -6,7 +6,7 @@ from typing import Any, TypeVar import msgspec -from kanta.serialization.framing import LineFramer +from kanta.serialization.framing import Framer, LineFramer T = TypeVar("T") @@ -14,7 +14,7 @@ T = TypeVar("T") class JsonSerializer: """Line-based JSON serializer.""" - framer_cls = LineFramer + framer_cls: type[Framer] = LineFramer def encode(self, obj: Any) -> bytes: return msgspec.json.encode(obj) diff --git a/kanta/serialization/msgpack.py b/kanta/serialization/msgpack.py index cde4a2e..f831b37 100644 --- a/kanta/serialization/msgpack.py +++ b/kanta/serialization/msgpack.py @@ -6,7 +6,7 @@ from typing import Any, TypeVar import msgspec -from kanta.serialization.framing import BinFramer +from kanta.serialization.framing import BinFramer, Framer T = TypeVar("T") @@ -14,7 +14,7 @@ T = TypeVar("T") class MsgPackSerializer: """Binary serializer using MessagePack format.""" - framer_cls = BinFramer + framer_cls: type[Framer] = BinFramer def encode(self, obj: Any) -> bytes: return msgspec.msgpack.encode(obj)