forked from LBRYCommunity/lbry-sdk
lint
This commit is contained in:
parent
0a06810f36
commit
2f4b5d2ffe
3 changed files with 3 additions and 4 deletions
|
@ -309,7 +309,7 @@ def delete_all_the_things(height: int, p: ProgressContext):
|
||||||
def constrain(col):
|
def constrain(col):
|
||||||
if height == -1:
|
if height == -1:
|
||||||
return col == -1
|
return col == -1
|
||||||
return col <= height
|
return col >= height
|
||||||
|
|
||||||
deletes = [
|
deletes = [
|
||||||
BlockTable.delete().where(constrain(BlockTable.c.height)),
|
BlockTable.delete().where(constrain(BlockTable.c.height)),
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Dict, Tuple
|
from typing import List, Dict, Tuple
|
||||||
|
|
||||||
from lbry.conf import Config
|
|
||||||
from lbry.blockchain import Ledger, Transaction
|
from lbry.blockchain import Ledger, Transaction
|
||||||
from lbry.wallet.sync import SPVSync
|
from lbry.wallet.sync import SPVSync
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ import unittest
|
||||||
from unittest.case import _Outcome
|
from unittest.case import _Outcome
|
||||||
from typing import Optional, List, Union
|
from typing import Optional, List, Union
|
||||||
from binascii import unhexlify, hexlify
|
from binascii import unhexlify, hexlify
|
||||||
|
from distutils.dir_util import remove_tree
|
||||||
|
|
||||||
import ecdsa
|
import ecdsa
|
||||||
from distutils.dir_util import remove_tree
|
|
||||||
|
|
||||||
from lbry.db import Database
|
from lbry.db import Database
|
||||||
from lbry.blockchain import (
|
from lbry.blockchain import (
|
||||||
|
@ -430,7 +430,7 @@ class IntegrationTestCase(AsyncioTestCase):
|
||||||
db = Database.temp_sqlite_regtest(chain.ledger.conf)
|
db = Database.temp_sqlite_regtest(chain.ledger.conf)
|
||||||
elif db_driver.startswith('postgres') or db_driver.startswith('psycopg'):
|
elif db_driver.startswith('postgres') or db_driver.startswith('psycopg'):
|
||||||
db_driver = 'postgresql'
|
db_driver = 'postgresql'
|
||||||
db_name = f'lbry_test_chain'
|
db_name = 'lbry_test_chain'
|
||||||
db_connection = 'postgres:postgres@localhost:5432'
|
db_connection = 'postgres:postgres@localhost:5432'
|
||||||
meta_db = Database.from_url(f'postgresql://{db_connection}/postgres')
|
meta_db = Database.from_url(f'postgresql://{db_connection}/postgres')
|
||||||
await meta_db.drop(db_name)
|
await meta_db.drop(db_name)
|
||||||
|
|
Loading…
Reference in a new issue