mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 09:19:42 +01:00
fix pylint W0612 (unused-variable)
This commit is contained in:
parent
32f4c8aa17
commit
d29fcca6aa
5 changed files with 5 additions and 4 deletions
|
@ -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,),
|
||||||
)
|
)
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue