refactor(redis): type botocore credentials without Any

Deferred annotation evaluation keeps the type-checking-only botocore
import off the runtime path, so the alias only reintroduced typing.Any,
which the strict ruff budget now bans
This commit is contained in:
eugene-yao-zocdoc 2026-09-09 10:03:26 -04:00
parent aca81c263c
commit cd4073895f

View file

@ -4,15 +4,13 @@ import asyncio
import threading
import time
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Final, Protocol
from typing import TYPE_CHECKING, Final, Protocol
from urllib.parse import quote
from redis.credentials import CredentialProvider
if TYPE_CHECKING:
from botocore.credentials import Credentials
else:
Credentials = Any # rebind-ok: runtime alias for the type-checking-only botocore import
# Azure AD scope for Redis Cache for Azure.
AZURE_REDIS_SCOPE: Final = "https://redis.azure.com/.default"