mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-06 22:11:26 +00:00
Change default value of read()
From `n = -1` to `n = None`, to comply with trio API
This commit is contained in:
@ -54,7 +54,7 @@ class MsgIOReader(ReadCloser):
|
||||
self.read_closer = read_closer
|
||||
self.next_length = None
|
||||
|
||||
async def read(self, n: int = -1) -> bytes:
|
||||
async def read(self, n: int = None) -> bytes:
|
||||
return await self.read_msg()
|
||||
|
||||
async def read_msg(self) -> bytes:
|
||||
|
||||
Reference in New Issue
Block a user