mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
ci: fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import abc
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional, Tuple
|
||||
|
||||
|
||||
class Backend:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from aiobotocore.client import AioBaseClient
|
||||
from aiobotocore.session import get_session
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from aiomcache import Client
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from redis.asyncio.client import Redis
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import datetime
|
||||
import json
|
||||
import pickle # nosec:B403
|
||||
from decimal import Decimal
|
||||
from typing import Any, Dict, Union
|
||||
from typing import Any
|
||||
|
||||
import pendulum
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import inspect
|
||||
import sys
|
||||
from functools import wraps
|
||||
from typing import Any, Awaitable, Callable, Optional, TypeVar, Type
|
||||
from typing import Any, Awaitable, Callable, Optional, Type, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from typing import ParamSpec
|
||||
@@ -15,7 +15,6 @@ from starlette.responses import Response
|
||||
from fastapi_cache import FastAPICache
|
||||
from fastapi_cache.coder import Coder
|
||||
|
||||
|
||||
P = ParamSpec("P")
|
||||
R = TypeVar("R")
|
||||
|
||||
@@ -113,7 +112,7 @@ def cache(
|
||||
request=request,
|
||||
response=response,
|
||||
args=args,
|
||||
kwargs=copy_kwargs
|
||||
kwargs=copy_kwargs,
|
||||
)
|
||||
else:
|
||||
cache_key = key_builder(
|
||||
@@ -122,7 +121,7 @@ def cache(
|
||||
request=request,
|
||||
response=response,
|
||||
args=args,
|
||||
kwargs=copy_kwargs
|
||||
kwargs=copy_kwargs,
|
||||
)
|
||||
|
||||
ttl, ret = await backend.get_with_ttl(cache_key)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import hashlib
|
||||
from typing import Optional, Callable
|
||||
from typing import Callable, Optional
|
||||
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import Response
|
||||
|
||||
Reference in New Issue
Block a user