From bb8e86addf6e1011a5a3b90031f992215287eb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Fri, 30 Dec 2022 09:48:52 +0100 Subject: [PATCH] formatting --- lnbits/extensions/tipjar/crud.py | 2 +- lnbits/extensions/tipjar/views.py | 2 +- lnbits/extensions/tipjar/views_api.py | 13 ++++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lnbits/extensions/tipjar/crud.py b/lnbits/extensions/tipjar/crud.py index ff9220b1..1b58a43d 100644 --- a/lnbits/extensions/tipjar/crud.py +++ b/lnbits/extensions/tipjar/crud.py @@ -45,7 +45,7 @@ async def create_tipjar(data: createTipJar) -> TipJar: """, (data.name, data.wallet, data.webhook, data.onchain), ) - row = await db.fetchone( "SELECT * FROM tipjar.TipJars LIMIT 1") + row = await db.fetchone("SELECT * FROM tipjar.TipJars LIMIT 1") tipjar = TipJar(**row) assert tipjar return tipjar diff --git a/lnbits/extensions/tipjar/views.py b/lnbits/extensions/tipjar/views.py index 21da0d2e..56f718e2 100644 --- a/lnbits/extensions/tipjar/views.py +++ b/lnbits/extensions/tipjar/views.py @@ -1,6 +1,6 @@ from http import HTTPStatus -from fastapi import Request, Depends +from fastapi import Depends, Request from fastapi.param_functions import Query from fastapi.templating import Jinja2Templates from starlette.exceptions import HTTPException diff --git a/lnbits/extensions/tipjar/views_api.py b/lnbits/extensions/tipjar/views_api.py index bbc824e8..d0c7ac7d 100644 --- a/lnbits/extensions/tipjar/views_api.py +++ b/lnbits/extensions/tipjar/views_api.py @@ -22,7 +22,7 @@ from .crud import ( update_tipjar, ) from .helpers import get_charge_details -from .models import createTipJar, createTip, createTips +from .models import createTip, createTipJar, createTips @tipjar_ext.post("/api/v1/tipjars") @@ -116,7 +116,11 @@ async def api_get_tips(wallet: WalletTypeInfo = Depends(get_key_type)): @tipjar_ext.put("/api/v1/tips/{tip_id}") -async def api_update_tip(data: createTip, wallet: WalletTypeInfo = Depends(get_key_type), tip_id: str = Query(None)): +async def api_update_tip( + data: createTip, + wallet: WalletTypeInfo = Depends(get_key_type), + tip_id: str = Query(None), +): """Update a tip with the data given in the request""" if tip_id: tip = await get_tip(tip_id) @@ -141,7 +145,10 @@ async def api_update_tip(data: createTip, wallet: WalletTypeInfo = Depends(get_k @tipjar_ext.put("/api/v1/tipjars/{tipjar_id}") -async def api_update_tipjar(data: createTipJar, wallet: WalletTypeInfo = Depends(get_key_type), tipjar_id: int = Query(None) +async def api_update_tipjar( + data: createTipJar, + wallet: WalletTypeInfo = Depends(get_key_type), + tipjar_id: int = Query(None), ): """Update a tipjar with the data given in the request""" if tipjar_id: