Skip to content

Commit 5050067

Browse files
committed
Added missing warning catcher.
1 parent abaa65a commit 5050067

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

aiohttp_deps/initializer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ def __init__(
9393
for method in hdrs.METH_ALL
9494
if hasattr(original_route, method.lower())
9595
}
96-
self.graph_map = {
97-
method: DependencyGraph(getattr(original_route, method))
98-
for method in allowed_methods
99-
}
96+
with warnings.catch_warnings():
97+
warnings.filterwarnings("ignore", r".*Cannot resolve.*Request.*")
98+
self.graph_map = {
99+
method: DependencyGraph(getattr(original_route, method))
100+
for method in allowed_methods
101+
}
100102

101103
async def __call__(self, request: web.Request) -> web.StreamResponse:
102104
"""

0 commit comments

Comments
 (0)