From b1dc05a89a7a327de0c4526f5149b5fdfad88d22 Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Fri, 28 Apr 2023 12:11:06 +0100 Subject: [PATCH] key_builder type; args and kwargs are always given These arguments are never set to None so don't need to be optional. They are always a tuple and a dict but can be empty. --- fastapi_cache/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi_cache/types.py b/fastapi_cache/types.py index a05a37e..c409dfb 100644 --- a/fastapi_cache/types.py +++ b/fastapi_cache/types.py @@ -15,7 +15,7 @@ class KeyBuilder(Protocol): *, request: Optional[Request] = ..., response: Optional[Response] = ..., - args: Optional[tuple[Any, ...]] = ..., - kwargs: Optional[dict[str, Any]] = ..., + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] = ..., ) -> Union[Awaitable[str], str]: ...