mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
More type hint compatibility updates
This commit is contained in:
@@ -83,7 +83,7 @@ def cache(
|
|||||||
def wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P, Awaitable[Union[R, Response]]]:
|
def wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P, Awaitable[Union[R, Response]]]:
|
||||||
# get_typed_signature ensures that any forward references are resolved first
|
# get_typed_signature ensures that any forward references are resolved first
|
||||||
wrapped_signature = get_typed_signature(func)
|
wrapped_signature = get_typed_signature(func)
|
||||||
to_inject: list[Parameter] = []
|
to_inject: List[Parameter] = []
|
||||||
request_param = _locate_param(wrapped_signature, injected_request, to_inject)
|
request_param = _locate_param(wrapped_signature, injected_request, to_inject)
|
||||||
response_param = _locate_param(wrapped_signature, injected_response, to_inject)
|
response_param = _locate_param(wrapped_signature, injected_response, to_inject)
|
||||||
return_type = get_typed_return_annotation(func)
|
return_type = get_typed_return_annotation(func)
|
||||||
|
|||||||
Reference in New Issue
Block a user