mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 15:40:54 +00:00
add still needed TYPE_CHECK
This commit is contained in:
@ -19,6 +19,7 @@ from .network_interface import INetwork
|
||||
from .notifee_interface import INotifee
|
||||
from .stream.net_stream import NetStream
|
||||
from .stream.net_stream_interface import INetStream
|
||||
from .typing import GenericProtocolHandlerFn
|
||||
|
||||
StreamHandlerFn = Callable[[INetStream], Awaitable[None]]
|
||||
|
||||
@ -248,9 +249,6 @@ class Swarm(INetwork):
|
||||
# TODO: `disconnect`?
|
||||
|
||||
|
||||
GenericProtocolHandlerFn = Callable[[IMuxedStream], Awaitable[None]]
|
||||
|
||||
|
||||
def create_generic_protocol_handler(swarm: Swarm) -> GenericProtocolHandlerFn:
|
||||
"""
|
||||
Create a generic protocol handler from the given swarm. We use swarm
|
||||
|
||||
Reference in New Issue
Block a user