diff --git a/pyproject.toml b/pyproject.toml index a1903f6..e488a11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiohttpx" -version = "1.2.1" +version = "1.2.2" description = "Custom HTTPX client with aiohttp transport, rate limiter and caching" readme = "README.md" authors = [ diff --git a/src/aiohttpx/transports/cache.py b/src/aiohttpx/transports/cache.py index d80e814..5b2c3d8 100644 --- a/src/aiohttpx/transports/cache.py +++ b/src/aiohttpx/transports/cache.py @@ -17,7 +17,7 @@ def generate_cache_key(request: Request) -> str: async def cache_response( - client: Redis[bytes], + client: 'Redis[bytes]', cache_key: str, request: Request, response: Response | HTTPXResponse, @@ -38,7 +38,7 @@ def get_ttl_from_headers(headers: m.Headers) -> int | None: async def get_cached_response( - client: Redis[bytes], cache_key: str + client: 'Redis[bytes]', cache_key: str ) -> Response | None: cached_data = await client.get(cache_key) diff --git a/src/aiohttpx/transports/rate_limiter.py b/src/aiohttpx/transports/rate_limiter.py index 2fbe105..85afb7c 100644 --- a/src/aiohttpx/transports/rate_limiter.py +++ b/src/aiohttpx/transports/rate_limiter.py @@ -9,7 +9,7 @@ from aiohttpx.transports.aio import AiohttpTransport class AsyncRateLimit(AiohttpTransport): def __init__( - self, redis: Redis[bytes] | None, key: str | None, limit: int | None + self, redis: 'Redis[bytes] | None', key: str | None, limit: int | None ) -> None: self.transport = AiohttpTransport() self.client = redis