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): async def delete_tinyurl(tinyurl_id: str):
row = await db.execute( await db.execute(
f"DELETE FROM tiny_url WHERE id = ?", f"DELETE FROM tiny_url WHERE id = ?",
(tinyurl_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: async with db.connect() as conn:
try: try:
payment_hash, payment_request = await create_invoice( _, payment_request = await create_invoice(
wallet_id=wallet.id, wallet_id=wallet.id,
amount=amount, amount=amount,
memo=memo, memo=memo,

View file

@ -135,7 +135,7 @@ def get_current_extension_name() -> str:
import os import os
callee_filepath = inspect.stack()[1].filename 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) path = os.path.normpath(callee_dirname)
extension_director_name = path.split(os.sep)[-1] 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: def decode(lnurl: str) -> str:
hrp, data = bech32_decode(lnurl) hrp, data = bech32_decode(lnurl)
assert hrp
assert data assert data
bech32_data = convertbits(data, 5, 8, False) bech32_data = convertbits(data, 5, 8, False)
assert bech32_data assert bech32_data

View file

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