From 3cfc292d84ec0f6980417ab885ecc9d3e9906321 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 14 Apr 2021 10:14:41 -0400 Subject: [PATCH] lint --- lbry/wallet/account.py | 3 +-- lbry/wallet/database.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lbry/wallet/account.py b/lbry/wallet/account.py index e82003363..b673a5cb5 100644 --- a/lbry/wallet/account.py +++ b/lbry/wallet/account.py @@ -5,7 +5,6 @@ import logging import typing import asyncio import random -from functools import partial from hashlib import sha256 from string import hexdigits from typing import Type, Dict, Tuple, Optional, Any, List @@ -16,7 +15,7 @@ from lbry.crypto.crypt import aes_encrypt, aes_decrypt from .bip32 import PrivateKey, PubKey, from_extended_key_string from .mnemonic import Mnemonic -from .constants import COIN, CLAIM_TYPES, TXO_TYPES +from .constants import COIN, TXO_TYPES from .transaction import Transaction, Input, Output if typing.TYPE_CHECKING: diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index dc21c3f92..95cf15b62 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -1147,7 +1147,10 @@ class Database(SQLiteMixin): result = (await self.select_txos( f"COALESCE(SUM(amount), 0) AS total," f"COALESCE(SUM(CASE WHEN txo_type != {TXO_TYPES['other']} THEN amount ELSE 0 END), 0) AS reserved," - f"COALESCE(SUM(CASE WHEN txo_type IN ({','.join(map(str, CLAIM_TYPES))}) THEN amount ELSE 0 END), 0) AS claims," + f"COALESCE(SUM(" + f" CASE WHEN" + f" txo_type IN ({','.join(map(str, CLAIM_TYPES))})" + f" THEN amount ELSE 0 END), 0) AS claims," f"COALESCE(SUM(CASE WHEN txo_type = {TXO_TYPES['support']} THEN amount ELSE 0 END), 0) AS supports," f"COALESCE(SUM(" f" CASE WHEN"