mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Apply PR feedback: fix type hints
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import (
|
||||
Any,
|
||||
Coroutine,
|
||||
Iterable,
|
||||
)
|
||||
|
||||
@ -31,7 +30,7 @@ class IContentRouting(ABC):
|
||||
class IPeerRouting(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def find_peer(self, peer_id: ID) -> Coroutine[Any, Any, PeerInfo]:
|
||||
async def find_peer(self, peer_id: ID) -> PeerInfo:
|
||||
"""
|
||||
Find specific Peer
|
||||
FindPeer searches for a peer with given peer_id, returns a peer.PeerInfo
|
||||
|
||||
@ -9,6 +9,7 @@ from libp2p.kademlia.kad_peerinfo import (
|
||||
)
|
||||
from libp2p.kademlia.network import KademliaServer
|
||||
from libp2p.peer.id import ID
|
||||
from libp2p.peer.peerinfo import PeerInfo
|
||||
from libp2p.routing.interfaces import IPeerRouting
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user