From 5050067b037de41e552e2768008a028ab335c439 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Mon, 9 Dec 2024 13:39:08 +0100 Subject: [PATCH] Added missing warning catcher. --- aiohttp_deps/initializer.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aiohttp_deps/initializer.py b/aiohttp_deps/initializer.py index e3ab2ab..476aa00 100644 --- a/aiohttp_deps/initializer.py +++ b/aiohttp_deps/initializer.py @@ -93,10 +93,12 @@ def __init__( for method in hdrs.METH_ALL if hasattr(original_route, method.lower()) } - self.graph_map = { - method: DependencyGraph(getattr(original_route, method)) - for method in allowed_methods - } + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", r".*Cannot resolve.*Request.*") + self.graph_map = { + method: DependencyGraph(getattr(original_route, method)) + for method in allowed_methods + } async def __call__(self, request: web.Request) -> web.StreamResponse: """