diff --git a/livekit-rtc/livekit/rtc/chat.py b/livekit-rtc/livekit/rtc/chat.py index b6d0a7e5..17220887 100644 --- a/livekit-rtc/livekit/rtc/chat.py +++ b/livekit-rtc/livekit/rtc/chat.py @@ -96,8 +96,7 @@ def _on_data_received(self, dp: DataPacket): if self._callback: self._callback(msg) except Exception as e: - logging.warning( - "failed to parse chat message: %s", e, exc_info=e) + logging.warning("failed to parse chat message: %s", e, exc_info=e) @dataclass diff --git a/livekit-rtc/tests/test_chat.py b/livekit-rtc/tests/test_chat.py index 48be3b83..161bf9be 100644 --- a/livekit-rtc/tests/test_chat.py +++ b/livekit-rtc/tests/test_chat.py @@ -20,8 +20,9 @@ def test_message_serialization(): msg2 = ChatMessage.from_jsondict(json.loads(json.dumps(data))) assert msg2.message == msg.message, "message should be the same" assert msg2.id == msg.id, "id should be the same" - assert int(msg2.timestamp.timestamp()/1000) == int(msg.timestamp.timestamp() / - 1000), "timestamp should be the same" + assert int(msg2.timestamp.timestamp() / 1000) == int( + msg.timestamp.timestamp() / 1000 + ), "timestamp should be the same" assert not msg2.deleted, "not deleted" # deletion is handled