forked from goodboy/tractor
1
0
Fork 0

Add some `bytes` annots

runtime_to_msgspec
Tyler Goodlet 2024-04-18 15:40:26 -04:00
parent 4aa24f8518
commit e5f0b450cf
1 changed files with 2 additions and 4 deletions

View File

@ -314,8 +314,7 @@ class MsgpackTCPStream(MsgTransport):
while True:
try:
header = await self.recv_stream.receive_exactly(4)
header: bytes = await self.recv_stream.receive_exactly(4)
except (
ValueError,
ConnectionResetError,
@ -337,8 +336,7 @@ class MsgpackTCPStream(MsgTransport):
size, = struct.unpack("<I", header)
log.transport(f'received header {size}') # type: ignore
msg_bytes = await self.recv_stream.receive_exactly(size)
msg_bytes: bytes = await self.recv_stream.receive_exactly(size)
log.transport(f"received {msg_bytes}") # type: ignore
try: