remove commented out and unused code in app object, it is now used in lnbits/__main__.py directly, fixes mypy error
This commit is contained in:
parent
83a000d7c9
commit
45a13fd807
|
@ -17,7 +17,6 @@ from loguru import logger
|
||||||
import lnbits.settings
|
import lnbits.settings
|
||||||
from lnbits.core.tasks import register_task_listeners
|
from lnbits.core.tasks import register_task_listeners
|
||||||
|
|
||||||
from .commands import db_migrate, handle_assets
|
|
||||||
from .core import core_app
|
from .core import core_app
|
||||||
from .core.views.generic import core_html_routes
|
from .core.views.generic import core_html_routes
|
||||||
from .helpers import (
|
from .helpers import (
|
||||||
|
@ -84,7 +83,6 @@ def create_app(config_object="lnbits.settings") -> FastAPI:
|
||||||
check_funding_source(app)
|
check_funding_source(app)
|
||||||
register_assets(app)
|
register_assets(app)
|
||||||
register_routes(app)
|
register_routes(app)
|
||||||
# register_commands(app)
|
|
||||||
register_async_tasks(app)
|
register_async_tasks(app)
|
||||||
register_exception_handlers(app)
|
register_exception_handlers(app)
|
||||||
|
|
||||||
|
@ -137,12 +135,6 @@ def register_routes(app: FastAPI) -> None:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def register_commands(app: FastAPI):
|
|
||||||
"""Register Click commands."""
|
|
||||||
app.cli.add_command(db_migrate)
|
|
||||||
app.cli.add_command(handle_assets)
|
|
||||||
|
|
||||||
|
|
||||||
def register_assets(app: FastAPI):
|
def register_assets(app: FastAPI):
|
||||||
"""Serve each vendored asset separately or a bundle."""
|
"""Serve each vendored asset separately or a bundle."""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user