forked from LBRYCommunity/lbry-sdk
made pylint and mypy happy
This commit is contained in:
parent
899a6f0d4a
commit
b5f245d9b6
4 changed files with 12 additions and 8 deletions
|
@ -10,7 +10,7 @@ source =
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[pylint]
|
[pylint]
|
||||||
ignore=words,server,workbench
|
ignore=words,server,workbench,rpc
|
||||||
max-args=10
|
max-args=10
|
||||||
max-line-length=110
|
max-line-length=110
|
||||||
good-names=T,t,n,i,j,k,x,y,s,f,d,h,c,e,op,db,tx,io,cachedproperty,log,id
|
good-names=T,t,n,i,j,k,x,y,s,f,d,h,c,e,op,db,tx,io,cachedproperty,log,id
|
||||||
|
|
|
@ -3,7 +3,7 @@ import asyncio
|
||||||
from asyncio import CancelledError
|
from asyncio import CancelledError
|
||||||
from itertools import cycle
|
from itertools import cycle
|
||||||
|
|
||||||
from aiorpcx import RPCSession as BaseClientSession, Connector, RPCError
|
from torba.rpc import RPCSession as BaseClientSession, Connector, RPCError
|
||||||
|
|
||||||
from torba import __version__
|
from torba import __version__
|
||||||
from torba.stream import StreamController
|
from torba.stream import StreamController
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Notification(SingleRequest):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Batch(object):
|
class Batch:
|
||||||
__slots__ = ('items', )
|
__slots__ = ('items', )
|
||||||
|
|
||||||
def __init__(self, items):
|
def __init__(self, items):
|
||||||
|
@ -646,9 +646,9 @@ class JSONRPCConnection(object):
|
||||||
parts.append(error.error_message)
|
parts.append(error.error_message)
|
||||||
|
|
||||||
if not items and parts:
|
if not items and parts:
|
||||||
error = ProtocolError(0, "")
|
protocol_error = ProtocolError(0, "")
|
||||||
error.error_message = protocol.batch_message_from_parts(parts)
|
protocol_error.error_message = protocol.batch_message_from_parts(parts)
|
||||||
raise error
|
raise protocol_error
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def _receive_response_batch(self, payloads):
|
def _receive_response_batch(self, payloads):
|
||||||
|
|
|
@ -29,15 +29,19 @@ __all__ = ('Connector', 'RPCSession', 'MessageSession', 'Server',
|
||||||
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from asyncio import Event, CancelledError
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
|
||||||
from . import *
|
from .jsonrpc import Request, JSONRPCConnection, JSONRPCv2, JSONRPC, Batch, Notification
|
||||||
|
from .jsonrpc import RPCError, ProtocolError
|
||||||
|
from .curio import TaskGroup, TaskTimeout, spawn_sync, ignore_after, timeout_after
|
||||||
|
from .framing import BadMagicError, BadChecksumError, OversizedPayloadError
|
||||||
from .util import Concurrency
|
from .util import Concurrency
|
||||||
|
|
||||||
|
|
||||||
class Connector(object):
|
class Connector:
|
||||||
|
|
||||||
def __init__(self, session_factory, host=None, port=None, proxy=None,
|
def __init__(self, session_factory, host=None, port=None, proxy=None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
Loading…
Add table
Reference in a new issue