Merge pull request #331 from dmuhs/fix/docs-format

Add automatic docstring formatting
This commit is contained in:
Piper Merriam
2019-10-28 09:39:52 -06:00
committed by GitHub
73 changed files with 519 additions and 561 deletions

View File

@ -18,6 +18,7 @@ DEFAULT_NEGOTIATE_TIMEOUT = 60
class MuxerMultistream:
"""
MuxerMultistream is a multistream stream muxed transport multiplexer.
go implementation: github.com/libp2p/go-stream-muxer-multistream/multistream.go
"""
@ -35,9 +36,10 @@ class MuxerMultistream:
def add_transport(self, protocol: TProtocol, transport: TMuxerClass) -> None:
"""
Add a protocol and its corresponding transport to multistream-select(multiselect).
The order that a protocol is added is exactly the precedence it is negotiated in
multiselect.
Add a protocol and its corresponding transport to multistream-
select(multiselect). The order that a protocol is added is exactly the
precedence it is negotiated in multiselect.
:param protocol: the protocol name, which is negotiated in multiselect.
:param transport: the corresponding transportation to the ``protocol``.
"""
@ -49,8 +51,9 @@ class MuxerMultistream:
async def select_transport(self, conn: IRawConnection) -> TMuxerClass:
"""
Select a transport that both us and the node on the
other end of conn support and agree on
Select a transport that both us and the node on the other end of conn
support and agree on.
:param conn: conn to choose a transport over
:return: selected muxer transport
"""