chore: adhere to ruff's UP

basically use `list` and `type` instead of `List` and `Type`

this is save to use for python3.9 and has been deprecated. also has some
performance drawbacks.
read more here: https://docs.astral.sh/ruff/rules/non-pep585-annotation/
This commit is contained in:
dni ⚡
2024-04-15 13:38:04 +02:00
committed by Pavol Rusnak
parent a158056b99
commit b145bff566
12 changed files with 54 additions and 52 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, AsyncGenerator, Coroutine, NamedTuple, Optional, Type
from typing import TYPE_CHECKING, AsyncGenerator, Coroutine, NamedTuple, Optional
if TYPE_CHECKING:
from lnbits.nodes.base import Node
@@ -96,7 +96,7 @@ class Wallet(ABC):
async def cleanup(self):
pass
__node_cls__: Optional[Type[Node]] = None
__node_cls__: Optional[type[Node]] = None
@abstractmethod
def status(self) -> Coroutine[None, None, StatusResponse]:
+1 -1
View File
@@ -37,7 +37,7 @@ class FakeWallet(Wallet):
privkey: str = hashlib.pbkdf2_hmac(
"sha256",
secret.encode(),
("FakeWallet").encode(),
b"FakeWallet",
2048,
32,
).hex()