Fix mypy errors

This commit is contained in:
Dominik Muhs 2019-10-24 08:53:19 +02:00
parent eef505f2d9
commit 3db297fbee
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ class MplexStream(IMuxedStream):
:return: number of bytes written
"""
if self.event_local_closed.is_set():
raise MplexStreamClosed(f"cannot write to closed stream: data={data}")
raise MplexStreamClosed(f"cannot write to closed stream: data={data!r}")
flag = (
HeaderTags.MessageInitiator
if self.is_initiator

View File

@ -75,7 +75,7 @@ async def read_delim(reader: Reader) -> bytes:
raise ParseError(f"`len(msg_bytes)` should not be 0")
if msg_bytes[-1:] != b"\n":
raise ParseError(
f'`msg_bytes` is not delimited by b"\\n": `msg_bytes`={msg_bytes}'
f'`msg_bytes` is not delimited by b"\\n": `msg_bytes`={msg_bytes!r}'
)
return msg_bytes[:-1]