fix pylint W0612 (unused-variable)

This commit is contained in:
Pavol Rusnak 2023-01-21 12:07:19 +00:00
parent 32f4c8aa17
commit d29fcca6aa
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
5 changed files with 5 additions and 4 deletions

View File

@ -768,7 +768,7 @@ async def get_tinyurl_by_url(url: str) -> List[TinyURL]:
async def delete_tinyurl(tinyurl_id: str):
row = await db.execute(
await db.execute(
f"DELETE FROM tiny_url WHERE id = ?",
(tinyurl_id,),
)

View File

@ -184,7 +184,7 @@ async def api_payments_create_invoice(data: CreateInvoiceData, wallet: Wallet):
async with db.connect() as conn:
try:
payment_hash, payment_request = await create_invoice(
_, payment_request = await create_invoice(
wallet_id=wallet.id,
amount=amount,
memo=memo,

View File

@ -135,7 +135,7 @@ def get_current_extension_name() -> str:
import os
callee_filepath = inspect.stack()[1].filename
callee_dirname, callee_filename = os.path.split(callee_filepath)
callee_dirname, _ = os.path.split(callee_filepath)
path = os.path.normpath(callee_dirname)
extension_director_name = path.split(os.sep)[-1]

View File

@ -3,6 +3,7 @@ from bech32 import bech32_decode, bech32_encode, convertbits
def decode(lnurl: str) -> str:
hrp, data = bech32_decode(lnurl)
assert hrp
assert data
bech32_data = convertbits(data, 5, 8, False)
assert bech32_data

View File

@ -97,7 +97,7 @@ class LNbitsWallet(Wallet):
json={"out": True, "bolt11": bolt11},
timeout=None,
)
ok, checking_id, fee_msat, preimage, error_message = (
ok, checking_id, _, _, error_message = (
not r.is_error,
None,
None,