From 064c20f0b100a480929474ccb98ff48229793414 Mon Sep 17 00:00:00 2001 From: Miwory Date: Wed, 26 Nov 2025 13:37:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=82=D0=B8=D0=BF?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/aiohttpx/transports/cache.py | 4 ++-- src/aiohttpx/transports/rate_limiter.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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