chore: apply black to all .py files

This commit is contained in:
Stefan Stammberger
2021-11-24 14:31:55 +01:00
parent d93aecf960
commit 83b7779972
18 changed files with 139 additions and 90 deletions
+3 -1
View File
@@ -278,7 +278,9 @@ async def get_payments(
return [Payment.from_row(row) for row in rows]
async def delete_expired_invoices(conn: Optional[Connection] = None,) -> None:
async def delete_expired_invoices(
conn: Optional[Connection] = None,
) -> None:
# first we delete all invoices older than one month
await (conn or db).execute(
f"""
+1 -2
View File
@@ -316,8 +316,7 @@ async def check_invoice_status(
if not payment.pending:
return status
if payment.is_out and status.failed:
print(
f" - deleting outgoing failed payment {payment.checking_id}: {status}")
print(f" - deleting outgoing failed payment {payment.checking_id}: {status}")
await payment.delete()
elif not status.pending:
print(
+1
View File
@@ -15,6 +15,7 @@ from ..tasks import api_invoice_listeners
@core_app.get("/.well-known/lnurlp/{username}")
async def lnaddress(username: str, request: Request):
from lnbits.extensions.lnaddress.lnurl import lnurl_response
domain = request.client.host
return await lnurl_response(username, domain)