mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
rename typing.py to custom_types.py for clarity
This commit is contained in:
@ -16,6 +16,10 @@ from libp2p.crypto.keys import (
|
||||
PrivateKey,
|
||||
PublicKey,
|
||||
)
|
||||
from libp2p.custom_types import (
|
||||
StreamHandlerFn,
|
||||
TProtocol,
|
||||
)
|
||||
from libp2p.host.defaults import (
|
||||
get_default_protocols,
|
||||
)
|
||||
@ -53,10 +57,6 @@ from libp2p.protocol_muxer.multiselect_communicator import (
|
||||
from libp2p.tools.async_service import (
|
||||
background_trio_service,
|
||||
)
|
||||
from libp2p.typing import (
|
||||
StreamHandlerFn,
|
||||
TProtocol,
|
||||
)
|
||||
|
||||
from .host_interface import (
|
||||
IHost,
|
||||
|
||||
@ -18,7 +18,7 @@ from libp2p.identity.identify.protocol import (
|
||||
from libp2p.identity.identify.protocol import ID as IdentifyID
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from libp2p.typing import (
|
||||
from libp2p.custom_types import (
|
||||
StreamHandlerFn,
|
||||
TProtocol,
|
||||
)
|
||||
|
||||
@ -16,6 +16,10 @@ from libp2p.crypto.keys import (
|
||||
PrivateKey,
|
||||
PublicKey,
|
||||
)
|
||||
from libp2p.custom_types import (
|
||||
StreamHandlerFn,
|
||||
TProtocol,
|
||||
)
|
||||
from libp2p.network.network_interface import (
|
||||
INetworkService,
|
||||
)
|
||||
@ -28,10 +32,6 @@ from libp2p.peer.id import (
|
||||
from libp2p.peer.peerinfo import (
|
||||
PeerInfo,
|
||||
)
|
||||
from libp2p.typing import (
|
||||
StreamHandlerFn,
|
||||
TProtocol,
|
||||
)
|
||||
|
||||
|
||||
class IHost(ABC):
|
||||
|
||||
@ -4,6 +4,9 @@ import time
|
||||
|
||||
import trio
|
||||
|
||||
from libp2p.custom_types import (
|
||||
TProtocol,
|
||||
)
|
||||
from libp2p.host.host_interface import (
|
||||
IHost,
|
||||
)
|
||||
@ -16,9 +19,6 @@ from libp2p.network.stream.net_stream_interface import (
|
||||
INetStream,
|
||||
)
|
||||
from libp2p.peer.id import ID as PeerID
|
||||
from libp2p.typing import (
|
||||
TProtocol,
|
||||
)
|
||||
|
||||
ID = TProtocol("/ipfs/ping/1.0.0")
|
||||
PING_LENGTH = 32
|
||||
|
||||
Reference in New Issue
Block a user