Skip to content

Commit

Permalink
Added missing warning catcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius committed Dec 9, 2024
1 parent abaa65a commit 5050067
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions aiohttp_deps/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down

0 comments on commit 5050067

Please sign in to comment.