Update libp2p/peer/peerinfo.py

Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
This commit is contained in:
aratz-lasa 2019-10-15 16:31:20 +02:00 committed by GitHub
parent 8143563831
commit 65b5e7aeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ class PeerInfo:
def to_string(self) -> str:
return json.dumps([self.peer_id.to_string(), list(map(lambda a: str(a), self.addrs))])
def __eq__(self, other):
def __eq__(self, other: Any) -> bool:
return isinstance(other, PeerInfo) and self.peer_id == other.peer_id and self.addrs == other.addrs
@classmethod