pylint and use torba master

This commit is contained in:
Lex Berezhny 2019-05-18 00:10:24 -04:00
parent 342f485ddf
commit e56b72cf04
2 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@ jobs:
name: "pylint lbrynet"
install:
- pip install astroid pylint
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
- pip install git+https://github.com/lbryio/torba.git@master#egg=torba
- pip install -e .
script: pylint lbrynet
@ -18,7 +18,7 @@ jobs:
name: "Unit Tests"
install:
- pip install coverage
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
- pip install git+https://github.com/lbryio/torba.git@master#egg=torba
- pip install -e .
script:
- HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -vv tests.unit
@ -30,7 +30,7 @@ jobs:
cache: false
install:
- pip install tox-travis coverage
- pushd .. && git clone --single-branch --branch sqltrie https://github.com/lbryio/torba.git && popd
- pushd .. && git clone --single-branch --branch master https://github.com/lbryio/torba.git && popd
script: tox
after_success:
- coverage combine tests/
@ -39,7 +39,7 @@ jobs:
- name: "Run Examples"
install:
- pip install coverage
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
- pip install git+https://github.com/lbryio/torba.git@master#egg=torba
- pip install -e .
script:
- HOME=/tmp coverage run -p --source=lbrynet scripts/generate_json_api.py

View file

@ -503,7 +503,7 @@ class SQLDB:
column = order_by[1:] if is_asc else order_by
if column not in self.ORDER_FIELDS:
raise NameError(f'{column} is not a valid order_by field')
elif column == 'name':
if column == 'name':
column = 'normalized'
sql_order_by.append(
f"claim.{column} ASC" if is_asc else f"claim.{column} DESC"