mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-02 12:01:27 +00:00
run lint and fix errors, except mypy
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from abc import (
|
||||
ABC,
|
||||
abstractmethod,
|
||||
)
|
||||
|
||||
|
||||
class Closer(ABC):
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
from libp2p.exceptions import BaseLibp2pError
|
||||
from libp2p.exceptions import (
|
||||
BaseLibp2pError,
|
||||
)
|
||||
|
||||
|
||||
class IOException(BaseLibp2pError):
|
||||
|
||||
@ -5,13 +5,26 @@ from that repo: "a simple package to r/w length-delimited slices."
|
||||
|
||||
NOTE: currently missing the capability to indicate lengths by "varint" method.
|
||||
"""
|
||||
from abc import abstractmethod
|
||||
from abc import (
|
||||
abstractmethod,
|
||||
)
|
||||
|
||||
from libp2p.io.abc import MsgReadWriteCloser, Reader, ReadWriteCloser
|
||||
from libp2p.io.utils import read_exactly
|
||||
from libp2p.utils import decode_uvarint_from_stream, encode_varint_prefixed
|
||||
from libp2p.io.abc import (
|
||||
MsgReadWriteCloser,
|
||||
Reader,
|
||||
ReadWriteCloser,
|
||||
)
|
||||
from libp2p.io.utils import (
|
||||
read_exactly,
|
||||
)
|
||||
from libp2p.utils import (
|
||||
decode_uvarint_from_stream,
|
||||
encode_varint_prefixed,
|
||||
)
|
||||
|
||||
from .exceptions import MessageTooLarge
|
||||
from .exceptions import (
|
||||
MessageTooLarge,
|
||||
)
|
||||
|
||||
BYTE_ORDER = "big"
|
||||
|
||||
|
||||
@ -2,8 +2,12 @@ import logging
|
||||
|
||||
import trio
|
||||
|
||||
from libp2p.io.abc import ReadWriteCloser
|
||||
from libp2p.io.exceptions import IOException
|
||||
from libp2p.io.abc import (
|
||||
ReadWriteCloser,
|
||||
)
|
||||
from libp2p.io.exceptions import (
|
||||
IOException,
|
||||
)
|
||||
|
||||
logger = logging.getLogger("libp2p.io.trio")
|
||||
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
from libp2p.io.abc import Reader
|
||||
from libp2p.io.exceptions import IncompleteReadError
|
||||
from libp2p.io.abc import (
|
||||
Reader,
|
||||
)
|
||||
from libp2p.io.exceptions import (
|
||||
IncompleteReadError,
|
||||
)
|
||||
|
||||
DEFAULT_RETRY_READ_COUNT = 100
|
||||
|
||||
|
||||
Reference in New Issue
Block a user