Skip to content

Commit

Permalink
Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuhs committed Oct 23, 2019
1 parent 78aa5f9 commit b5dc89e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libp2p/stream_muxer/mplex/mplex_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def write(self, data: bytes) -> int:
: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
Expand Down
2 changes: 1 addition & 1 deletion libp2p/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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]

Expand Down

0 comments on commit b5dc89e

Please sign in to comment.