Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(asyncify.py): fix linting errors

Krrish Dholakia6bfcb431cd8b
diff --git a/litellm/litellm_core_utils/asyncify.py b/litellm/litellm_core_utils/asyncify.py
index bfb3a8254a0..6287263f893 100644
--- a/litellm/litellm_core_utils/asyncify.py
+++ b/litellm/litellm_core_utils/asyncify.py
@@ -1,5 +1,5 @@
import functools
-from typing import Awaitable, Callable
+from typing import Awaitable, Callable, Optional
import anyio
from anyio import to_thread
@@ -21,7 +21,7 @@ def asyncify(
function: Callable[T_ParamSpec, T_Retval],
*,
cancellable: bool = False,
- limiter: anyio.CapacityLimiter | None = None,
+ limiter: Optional[anyio.CapacityLimiter] = None,
) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
"""
Take a blocking function and create an async one that receives the same