Add automatic docstring formatter and apply

This commit is contained in:
Dominik Muhs
2019-10-24 08:41:10 +02:00
parent 30aeb35122
commit eef505f2d9
74 changed files with 565 additions and 760 deletions

View File

@ -24,9 +24,7 @@ class RawConnection(IRawConnection):
self._drain_lock = asyncio.Lock()
async def write(self, data: bytes) -> None:
"""
Raise `RawConnError` if the underlying connection breaks
"""
"""Raise `RawConnError` if the underlying connection breaks."""
try:
self.writer.write(data)
except ConnectionResetError as error:
@ -41,9 +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 delegated directly to the underlying ``self.reader``.
"""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
"""

View File

@ -2,8 +2,6 @@ from libp2p.io.abc import ReadWriteCloser
class IRawConnection(ReadWriteCloser):
"""
A Raw Connection provides a Reader and a Writer
"""
"""A Raw Connection provides a Reader and a Writer."""
initiator: bool