mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Enforce pre-summary newline in docstrings
This commit is contained in:
@ -39,7 +39,8 @@ class RawConnection(IRawConnection):
|
||||
raise RawConnError(error)
|
||||
|
||||
async def read(self, n: int = -1) -> bytes:
|
||||
"""Read up to ``n`` bytes from the underlying stream. This call is
|
||||
"""
|
||||
Read up to ``n`` bytes from the underlying stream. This call is
|
||||
delegated directly to the underlying ``self.reader``.
|
||||
|
||||
Raise `RawConnError` if the underlying connection breaks
|
||||
|
||||
@ -29,7 +29,8 @@ class INetwork(ABC):
|
||||
|
||||
@abstractmethod
|
||||
async def dial_peer(self, peer_id: ID) -> INetConn:
|
||||
"""dial_peer try to create a connection to peer_id.
|
||||
"""
|
||||
dial_peer try to create a connection to peer_id.
|
||||
|
||||
:param peer_id: peer if we want to dial
|
||||
:raises SwarmException: raised when an error occurs
|
||||
|
||||
@ -38,7 +38,8 @@ class NetStream(INetStream):
|
||||
self.protocol_id = protocol_id
|
||||
|
||||
async def read(self, n: int = -1) -> bytes:
|
||||
"""reads from stream.
|
||||
"""
|
||||
reads from stream.
|
||||
|
||||
:param n: number of bytes to read
|
||||
:return: bytes of input
|
||||
@ -51,7 +52,8 @@ class NetStream(INetStream):
|
||||
raise StreamReset from error
|
||||
|
||||
async def write(self, data: bytes) -> int:
|
||||
"""write to stream.
|
||||
"""
|
||||
write to stream.
|
||||
|
||||
:return: number of bytes written
|
||||
"""
|
||||
|
||||
@ -69,7 +69,8 @@ class Swarm(INetwork):
|
||||
self.common_stream_handler = stream_handler
|
||||
|
||||
async def dial_peer(self, peer_id: ID) -> INetConn:
|
||||
"""dial_peer try to create a connection to peer_id.
|
||||
"""
|
||||
dial_peer try to create a connection to peer_id.
|
||||
|
||||
:param peer_id: peer if we want to dial
|
||||
:raises SwarmException: raised when an error occurs
|
||||
|
||||
Reference in New Issue
Block a user