add typing to mplex

This commit is contained in:
Chih Cheng Liang
2019-08-02 17:53:51 +08:00
parent 36b7e8ded9
commit 239a5c88fb
3 changed files with 53 additions and 12 deletions

View File

@ -10,7 +10,7 @@ class MplexStream(IMuxedStream):
reference: https://github.com/libp2p/go-mplex/blob/master/stream.go
"""
def __init__(self, stream_id, initiator, mplex_conn):
def __init__(self, stream_id, initiator: bool, mplex_conn):
"""
create new MuxedStream in muxer
:param stream_id: stream stream id