Skip to content

Commit b5828bd

Browse files
authored
Merge pull request #27 from taskiq-python/bugfix/missing-warning
Added missing warning catcher.
2 parents abaa65a + 5050067 commit b5828bd

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)