Browse Source

specify ignore type

Co-authored-by: Motov Yurii <[email protected]>
pull/15091/head
Sofie Van Landeghem 4 months ago
committed by GitHub
parent
commit
7ae84add65
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      fastapi/routing.py

7
fastapi/routing.py

@ -100,8 +100,11 @@ def request_response(
and returns an ASGI application. and returns an ASGI application.
""" """
f: Callable[[Request], Awaitable[Response]] = ( 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] f: Callable[[Request], Awaitable[Response]] = (
) # ty: ignore 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: async def app(scope: Scope, receive: Receive, send: Send) -> None:
request = Request(scope, receive, send) request = Request(scope, receive, send)

Loading…
Cancel
Save