MCPcopy
hub / github.com/encode/starlette / _is_asgi3

Function _is_asgi3

starlette/testclient.py:63–66  ·  view source on GitHub ↗
(app: ASGI2App | ASGI3App)

Source from the content-addressed store, hash-verified

61
62
63def _is_asgi3(app: ASGI2App | ASGI3App) -> TypeGuard[ASGI3App]:
64 if inspect.isclass(app):
65 return hasattr(app, "__await__")
66 return is_async_callable(app)
67
68
69class _WrapASGI2:

Callers 1

__init__Method · 0.85

Calls 1

is_async_callableFunction · 0.90

Tested by

no test coverage detected