pylint and appveyor

This commit is contained in:
Jack Robison 2018-06-07 12:18:07 -04:00
parent 7f3ead67bf
commit a821647fbc
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
3 changed files with 10 additions and 16 deletions

View file

@ -23,7 +23,7 @@ clone_folder: c:\projects\lbry
test_script: test_script:
- cd C:\projects\lbry\ - cd C:\projects\lbry\
- pip install cython - pip install cython
- pip install mock pylint unqlite - pip install mock pylint unqlite Faker
- pip install . - pip install .
- pylint lbrynet - pylint lbrynet
# disable tests for now so that appveyor can build the app # disable tests for now so that appveyor can build the app

View file

@ -1,21 +1,23 @@
import base64 import base64
import datetime import datetime
import logging
import random import random
import socket import socket
import string import string
import json import json
import traceback
import functools
import logging
import pkg_resources import pkg_resources
from twisted.python.failure import Failure
from twisted.internet import defer from twisted.internet import defer
from lbryschema.claim import ClaimDict from lbryschema.claim import ClaimDict
from lbrynet.core.cryptoutils import get_lbry_hash_obj from lbrynet.core.cryptoutils import get_lbry_hash_obj
log = logging.getLogger(__name__)
# digest_size is in bytes, and blob hashes are hex encoded # digest_size is in bytes, and blob hashes are hex encoded
blobhash_length = get_lbry_hash_obj().digest_size * 2 blobhash_length = get_lbry_hash_obj().digest_size * 2
log = logging.getLogger(__name__)
# defining these time functions here allows for easier overriding in testing # defining these time functions here allows for easier overriding in testing
def now(): def now():
@ -174,16 +176,6 @@ def DeferredDict(d, consumeErrors=False):
defer.returnValue(response) defer.returnValue(response)
import traceback
import functools
import logging
from twisted.internet import defer
from twisted.python.failure import Failure
log = logging.getLogger(__name__)
class DeferredProfiler(object): class DeferredProfiler(object):
def __init__(self): def __init__(self):
self.profile_results = {} self.profile_results = {}

View file

@ -62,7 +62,9 @@ class NodeDataTest(unittest.TestCase):
def testStore(self): def testStore(self):
""" Tests if the node can store (and privately retrieve) some data """ """ Tests if the node can store (and privately retrieve) some data """
for key, port in self.cases: for key, port in self.cases:
yield self.node.store(self.contact, key, self.token, port, self.contact.id, 0) yield self.node.store( # pylint: disable=too-many-function-args
self.contact, key, self.token, port, self.contact.id, 0
)
for key, value in self.cases: for key, value in self.cases:
expected_result = self.contact.compact_ip() + str(struct.pack('>H', value)) + \ expected_result = self.contact.compact_ip() + str(struct.pack('>H', value)) + \
self.contact.id self.contact.id