feat: use __all__ to export deps from __init__.py (#2630)

* feat: export wallets
* remove linting exception
This commit is contained in:
dni ⚡ 2024-08-08 07:29:21 +02:00 committed by GitHub
parent 40ffa7dea0
commit 74d4ddd312
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 4 deletions

View file

@ -38,3 +38,6 @@ def init_core_routers(app: FastAPI):
app.include_router(tinyurl_router)
app.include_router(webpush_router)
app.include_router(users_router)
__all__ = ["core_app", "core_app_extra", "db"]

View file

@ -50,3 +50,26 @@ fake_wallet = FakeWallet()
# initialize as fake wallet
funding_source: Wallet = fake_wallet
__all__ = [
"AlbyWallet",
"BlinkWallet",
"BreezSdkWallet",
"ClicheWallet",
"CoreLightningWallet",
"CLightningWallet",
"CoreLightningRestWallet",
"EclairWallet",
"FakeWallet",
"LNbitsWallet",
"LndWallet",
"LndRestWallet",
"LNPayWallet",
"LnTipsWallet",
"OpenNodeWallet",
"PhoenixdWallet",
"SparkWallet",
"VoidWallet",
"ZBDWallet",
]

View file

@ -1 +1,3 @@
from .macaroon import load_macaroon
__all__ = ["load_macaroon"]

View file

@ -202,10 +202,6 @@ classmethod-decorators = [
"root_validator",
]
# Ignore unused imports in __init__.py files.
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401", "F403"]
[tool.ruff.lint.mccabe]
# TODO: Decrease this to 10.
max-complexity = 16