diff --git a/falcon_deps/resource.py b/falcon_deps/resource.py index b957168..7ef64d5 100644 --- a/falcon_deps/resource.py +++ b/falcon_deps/resource.py @@ -1,8 +1,8 @@ from typing import Any, Callable, Coroutine, Optional, Set, Union -import falcon.asgi from falcon import constants from falcon._typing import MethodDict +from falcon.asgi import Request, Response from falcon.routing.util import SuffixedMethodNotFoundError from taskiq_dependencies import DependencyGraph @@ -130,8 +130,8 @@ def handle_with_graph_http( responder_name: str, ) -> Callable[ [ - falcon.asgi.Request, - falcon.asgi.Response, + Request, + Response, Any, ], Coroutine[Any, Any, None], @@ -146,13 +146,13 @@ def handle_with_graph_http( graph = self.graph_map[responder_name] async def _handle_with_graph( - request: falcon.asgi.Request, - response: falcon.asgi.Response, + request: Request, + response: Response, **params: Any, ) -> None: async with graph.async_ctx( { - falcon.asgi.Request: request, + Request: request, }, ) as ctx: dep_kwargs = await ctx.resolve_kwargs()