MCPcopy
hub / github.com/fastapi/fastapi / wrapped_app

Function wrapped_app

tests/test_ws_router.py:195–203  ·  view source on GitHub ↗
(scope, receive, send)

Source from the content-addressed store, hash-verified

193 def middleware_constructor(app):
194 @functools.wraps(app)
195 async def wrapped_app(scope, receive, send):
196 if scope["type"] != "websocket":
197 return await app(scope, receive, send) # pragma: no cover
198
199 async def call_next():
200 return await app(scope, receive, send)
201
202 websocket = WebSocket(scope, receive=receive, send=send)
203 return await middleware_func(websocket, call_next)
204
205 return wrapped_app
206

Callers

nothing calls this directly

Calls 1

appFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…