Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
63
def
_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
69
class
_WrapASGI2:
Callers
1
__init__
Method · 0.85
Calls
1
is_async_callable
Function · 0.90
Tested by
no test coverage detected