Skip to content

Commit

Permalink
Small warning fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius committed Oct 1, 2024
1 parent b1af5ac commit 834413e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions aiohttp_deps/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ async def init(app: web.Application) -> None:
:param app: current application.
"""
for route in app.router.routes():
if inspect.isclass(route._handler):
if issubclass(route._handler, View):
route._handler = InjectableViewHandler(route._handler)
if inspect.isclass(route.handler):
if issubclass(route.handler, View):
route._handler = InjectableViewHandler(route.handler)
continue
route._handler = InjectableFuncHandler(route._handler)
route._handler = InjectableFuncHandler(route.handler)
4 changes: 2 additions & 2 deletions aiohttp_deps/swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ async def event_handler(app: web.Application) -> None: # noqa: C901
extra_openapi_schemas=route_extra_schemas,
)
except Exception as exc: # pragma: no cover
logger.warn(
logger.warning(
"Cannot add route info: %s",
exc,
exc_info=True,
Expand Down Expand Up @@ -316,7 +316,7 @@ async def event_handler(app: web.Application) -> None: # noqa: C901
extra_openapi_schemas=route_extra_schemas,
)
except Exception as exc: # pragma: no cover
logger.warn(
logger.warning(
"Cannot add route info: %s",
exc,
exc_info=True,
Expand Down

0 comments on commit 834413e

Please sign in to comment.