fix: python versions were defined incorrectly and remove 3.9 (#3006)

* chore: update requirements to python3.10
* chore: format RUF007 rule for py310
* wrongly specified python version
python3.13 there is a greenlet build error
This commit is contained in:
dni ⚡
2025-03-03 12:53:30 +01:00
committed by GitHub
parent 4ce14e2312
commit c5964436b5
16 changed files with 351 additions and 382 deletions
+7 -9
View File
@@ -4,7 +4,7 @@ import asyncio
import base64
import json
from http import HTTPStatus
from typing import TYPE_CHECKING, Optional
from typing import TYPE_CHECKING
from fastapi import HTTPException
from httpx import HTTPStatusError
@@ -60,9 +60,7 @@ def _parse_channel_point(raw: str) -> ChannelPoint:
class LndRestNode(Node):
wallet: LndRestWallet
async def request(
self, method: str, path: str, json: Optional[dict] = None, **kwargs
):
async def request(self, method: str, path: str, json: dict | None = None, **kwargs):
response = await self.wallet.client.request(
method, f"{self.wallet.endpoint}{path}", json=json, **kwargs
)
@@ -131,8 +129,8 @@ class LndRestNode(Node):
self,
peer_id: str,
local_amount: int,
push_amount: Optional[int] = None,
fee_rate: Optional[int] = None,
push_amount: int | None = None,
fee_rate: int | None = None,
) -> ChannelPoint:
response = await self.request(
"POST",
@@ -176,8 +174,8 @@ class LndRestNode(Node):
async def close_channel(
self,
short_id: Optional[str] = None,
point: Optional[ChannelPoint] = None,
short_id: str | None = None,
point: ChannelPoint | None = None,
force: bool = False,
):
if short_id:
@@ -218,7 +216,7 @@ class LndRestNode(Node):
},
)
async def get_channel(self, channel_id: str) -> Optional[NodeChannel]:
async def get_channel(self, channel_id: str) -> NodeChannel | None:
channel_info = await self.get(f"/v1/graph/edge/{channel_id}")
info = await self.get("/v1/getinfo")
if info["identity_pubkey"] == channel_info["node1_pub"]: