Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
khoribz committed Dec 8, 2024
1 parent 91fbf58 commit 1cdef3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion playground/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def after(self, _request, response):
return response


router.use_middleware(ExampleMiddleware)
# router.use_middleware(ExampleMiddleware)


@router.get('/main', middlewares=[ExampleMiddleware])
Expand Down
2 changes: 2 additions & 0 deletions web/router.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from http import HTTPMethod
from typing import Callable, Type

Expand Down Expand Up @@ -90,6 +91,7 @@ def __call__(self, environ, start_response):

if kwargs and handler:
# получаем типы аргументов из сигнатуры функции
logging.info(f'{handler=}')
signature = handler.__annotations__
# приводим аргументы к нужным типам
try:
Expand Down

0 comments on commit 1cdef3d

Please sign in to comment.