feat: update to uv (#59)

This commit is contained in:
dni ⚡ 2025-08-24 23:10:31 +02:00 committed by GitHub
commit 1bce3bde2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 2309 additions and 3763 deletions

View file

@ -1,5 +1,4 @@
from datetime import datetime
from typing import Optional
import shortuuid
from lnbits.db import Database
@ -39,7 +38,7 @@ async def create_withdraw_link(
return withdraw_link
async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
async def get_withdraw_link(link_id: str, num=0) -> WithdrawLink | None:
link = await db.fetchone(
"SELECT * FROM withdraw.withdraw_link WHERE id = :id",
{"id": link_id},
@ -52,7 +51,7 @@ async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
return link
async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> Optional[WithdrawLink]:
async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> WithdrawLink | None:
link = await db.fetchone(
"SELECT * FROM withdraw.withdraw_link WHERE unique_hash = :hash",
{"hash": unique_hash},