fix: add type hints for APIError and AnthropicError status codes

Fixes https://github.com/BerriAI/litellm/issues/5000
This commit is contained in:
Krrish Dholakia 2024-08-01 15:08:54 -07:00
parent 186dabebcb
commit db65a5a70f
2 changed files with 3 additions and 3 deletions

View file

@ -543,7 +543,7 @@ class InternalServerError(openai.InternalServerError): # type: ignore
class APIError(openai.APIError): # type: ignore
def __init__(
self,
status_code,
status_code: int,
message,
llm_provider,
model,
@ -754,7 +754,7 @@ class MockException(openai.APIError):
# used for testing
def __init__(
self,
status_code,
status_code: int,
message,
llm_provider,
model,

View file

@ -72,7 +72,7 @@ class AnthropicConstants(Enum):
class AnthropicError(Exception):
def __init__(self, status_code, message):
def __init__(self, status_code: int, message):
self.status_code = status_code
self.message: str = message
self.request = httpx.Request(