run lint and fix errors, except mypy

This commit is contained in:
pacrob
2024-02-19 15:56:20 -07:00
parent 42605c0288
commit 94483714a3
171 changed files with 4809 additions and 2290 deletions

View File

@ -1,12 +1,27 @@
from typing import Awaitable, Callable
from typing import (
Awaitable,
Callable,
)
from libp2p.host.host_interface import IHost
from libp2p.network.stream.exceptions import StreamError
from libp2p.network.stream.net_stream_interface import INetStream
from libp2p.network.swarm import Swarm
from libp2p.peer.peerinfo import info_from_p2p_addr
from libp2p.host.host_interface import (
IHost,
)
from libp2p.network.stream.exceptions import (
StreamError,
)
from libp2p.network.stream.net_stream_interface import (
INetStream,
)
from libp2p.network.swarm import (
Swarm,
)
from libp2p.peer.peerinfo import (
info_from_p2p_addr,
)
from .constants import MAX_READ_LEN
from .constants import (
MAX_READ_LEN,
)
async def connect_swarm(swarm_0: Swarm, swarm_1: Swarm) -> None:
@ -30,7 +45,7 @@ async def connect(node1: IHost, node2: IHost) -> None:
def create_echo_stream_handler(
ack_prefix: str
ack_prefix: str,
) -> Callable[[INetStream], Awaitable[None]]:
async def echo_stream_handler(stream: INetStream) -> None:
while True: