mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Run black over repo
This commit is contained in:
@ -1,13 +1,8 @@
|
||||
from typing import (
|
||||
List,
|
||||
)
|
||||
from typing import List
|
||||
|
||||
import multiaddr
|
||||
|
||||
from .id import (
|
||||
ID,
|
||||
id_b58_decode,
|
||||
)
|
||||
from .id import ID, id_b58_decode
|
||||
from .peerdata import PeerData
|
||||
|
||||
|
||||
@ -31,7 +26,9 @@ def info_from_p2p_addr(addr: multiaddr.Multiaddr) -> PeerInfo:
|
||||
|
||||
parts = addr.split()
|
||||
if not parts:
|
||||
raise InvalidAddrError(f"`parts`={parts} should at least have a protocol `P_P2P`")
|
||||
raise InvalidAddrError(
|
||||
f"`parts`={parts} should at least have a protocol `P_P2P`"
|
||||
)
|
||||
|
||||
p2p_part = parts[-1]
|
||||
last_protocol_code = p2p_part.protocols()[0].code
|
||||
|
||||
Reference in New Issue
Block a user