Sofie Van Landeghem
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
2 deletions
-
fastapi/routing.py
|
|
|
@ -100,8 +100,11 @@ def request_response( |
|
|
|
and returns an ASGI application. |
|
|
|
""" |
|
|
|
f: Callable[[Request], Awaitable[Response]] = ( |
|
|
|
func if is_async_callable(func) else functools.partial(run_in_threadpool, func) # type:ignore # ty: ignore[unused-ignore-comment] |
|
|
|
) # ty: ignore |
|
|
|
f: Callable[[Request], Awaitable[Response]] = ( |
|
|
|
func # type: ignore[assignment] # ty: ignore[unused-ignore-comment] |
|
|
|
if is_async_callable(func) |
|
|
|
else functools.partial(run_in_threadpool, func) # type: ignore[call-arg] # ty: ignore[unused-ignore-comment] |
|
|
|
) # ty: ignore[invalid-assignment] |
|
|
|
|
|
|
|
async def app(scope: Scope, receive: Receive, send: Send) -> None: |
|
|
|
request = Request(scope, receive, send) |
|
|
|
|