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

@ -38,8 +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,8 +51,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
"""
try:
@ -61,9 +61,7 @@ class NetStream(INetStream):
raise StreamClosed from error
async def close(self) -> None:
"""
close stream
"""
"""close stream."""
await self.muxed_stream.close()
async def reset(self) -> None:

View File

@ -23,6 +23,4 @@ class INetStream(ReadWriteCloser):
@abstractmethod
async def reset(self) -> None:
"""
Close both ends of the stream.
"""
"""Close both ends of the stream."""