Commit 379c6a36

Stainless Bot <dev@stainlessapi.com>
2024-05-28 17:22:38
chore: add missing __all__ definitions
1 parent 59855b2
Changed files (1)
src
openai
src/openai/lib/azure.py
@@ -2,7 +2,7 @@ from __future__ import annotations
 
 import os
 import inspect
-from typing import Any, Union, Mapping, TypeVar, Callable, Awaitable, cast, overload
+from typing import Any, Union, Mapping, TypeVar, Callable, Awaitable, overload
 from typing_extensions import Self, override
 
 import httpx
@@ -515,7 +515,7 @@ class AsyncAzureOpenAI(BaseAzureClient[httpx.AsyncClient, AsyncStream[Any]], Asy
             token = provider()
             if inspect.isawaitable(token):
                 token = await token
-            if not token or not isinstance(cast(Any, token), str):
+            if not token or not isinstance(token, str):
                 raise ValueError(
                     f"Expected `azure_ad_token_provider` argument to return a string but it returned {token}",
                 )