mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 08:00:54 +00:00
add still needed TYPE_CHECK
This commit is contained in:
@ -2,11 +2,16 @@ from abc import ABC, abstractmethod
|
||||
|
||||
from multiaddr import Multiaddr
|
||||
from libp2p.security.secure_conn_interface import ISecureConn
|
||||
from libp2p.network.swarm import GenericProtocolHandlerFn
|
||||
from libp2p.network.typing import GenericProtocolHandlerFn
|
||||
from libp2p.peer.id import ID
|
||||
from libp2p.stream_muxer.muxed_stream_interface import IMuxedStream
|
||||
from libp2p.stream_muxer.mplex.constants import HeaderTags
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from libp2p.stream_muxer.muxed_stream_interface import IMuxedStream
|
||||
|
||||
|
||||
|
||||
class IMuxedConn(ABC):
|
||||
"""
|
||||
@ -55,7 +60,7 @@ class IMuxedConn(ABC):
|
||||
@abstractmethod
|
||||
async def open_stream(
|
||||
self, protocol_id: str, multi_addr: Multiaddr
|
||||
) -> IMuxedStream:
|
||||
) -> "IMuxedStream":
|
||||
"""
|
||||
creates a new muxed_stream
|
||||
:param protocol_id: protocol_id of stream
|
||||
|
||||
Reference in New Issue
Block a user