Use complete type hints with all generic parameters filled

This makes the core fastapi_cache pass all strict type checker tests.
This commit is contained in:
Martijn Pieters
2023-04-27 16:31:42 +01:00
parent a52f6b1406
commit 9c966286b4
2 changed files with 5 additions and 5 deletions

View File

@@ -1,17 +1,17 @@
import hashlib
from typing import Callable, Optional
from typing import Any, Callable, Optional
from starlette.requests import Request
from starlette.responses import Response
def default_key_builder(
func: Callable,
func: Callable[..., Any],
namespace: str = "",
request: Optional[Request] = None,
response: Optional[Response] = None,
args: Optional[tuple] = None,
kwargs: Optional[dict] = None,
args: Optional[tuple[Any, ...]] = None,
kwargs: Optional[dict[str, Any]] = None,
) -> str:
from fastapi_cache import FastAPICache