Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions dash/backends/_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ async def _handle_error(

async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
# Handle lifespan events (startup/shutdown)

if scope["type"] == "lifespan":
try:
dash_app = get_app()
Expand All @@ -199,7 +200,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
return

# Non-HTTP/WebSocket scopes pass through
if scope["type"] not in ("http", "websocket"):
if scope["type"] != "http":
await self.app(scope, receive, send)
return

Expand Down Expand Up @@ -298,7 +299,6 @@ def setup_catchall(self, dash_app: Dash):

def _setup_catchall(self):
try:
print("Setting up catch-all route for unmatched paths", file=sys.stderr)
dash_app = get_app()

async def catchall(_request: Request):
Expand All @@ -317,10 +317,6 @@ def add_url_rule(
methods: list[str] | None = None,
include_in_schema: bool = False,
):
print(
f"Adding URL rule: {rule} -> {view_func} (endpoint: {endpoint}, methods: {methods})",
file=sys.stderr,
)
if rule == "":
rule = "/"
if isinstance(view_func, str):
Expand Down
1 change: 0 additions & 1 deletion dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ def __init__( # pylint: disable=too-many-statements, too-many-branches
self._got_first_request = {"pages": False, "setup_server": False}

if server:
print(f"init app from server {server}")
self.init_app()

self.logger.setLevel(logging.INFO)
Expand Down
Loading