Фикс типизации

This commit is contained in:
2025-11-26 13:37:30 +03:00
parent 3eaa68c559
commit 064c20f0b1
3 changed files with 4 additions and 4 deletions

View File

@ -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 = [

View File

@ -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)

View File

@ -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