chore: adhere to ruff's "N" rules (#2377)

* chore: adhere to ruff's "N" rules

WARN: reinstall failing extensions!

bunch of more consistent variable naming. inspired by this issue.
https://github.com/lnbits/lnbits/issues/2308

* fixup! chore: adhere to ruff's "N" rules
* rename to funding_source
* skip jmeter

---------

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
dni ⚡
2024-04-15 09:02:21 +02:00
committed by GitHub
co-authored by Pavol Rusnak
parent 055426ab53
commit 6d5ad9e229
28 changed files with 191 additions and 173 deletions
+6 -6
View File
@@ -14,7 +14,7 @@ from pydantic import BaseModel
from lnbits import core
from lnbits.db import DB_TYPE, POSTGRES, FromRowModel
from lnbits.wallets import get_wallet_class, set_wallet_class
from lnbits.wallets import get_funding_source, set_funding_source
class DbTestModel(FromRowModel):
@@ -23,10 +23,10 @@ class DbTestModel(FromRowModel):
value: Optional[str] = None
def get_random_string(N: int = 10):
def get_random_string(iterations: int = 10):
return "".join(
random.SystemRandom().choice(string.ascii_uppercase + string.digits)
for _ in range(N)
for _ in range(iterations)
)
@@ -34,9 +34,9 @@ async def get_random_invoice_data():
return {"out": False, "amount": 10, "memo": f"test_memo_{get_random_string(10)}"}
set_wallet_class()
WALLET = get_wallet_class()
is_fake: bool = WALLET.__class__.__name__ == "FakeWallet"
set_funding_source()
funding_source = get_funding_source()
is_fake: bool = funding_source.__class__.__name__ == "FakeWallet"
is_regtest: bool = not is_fake