style: fix linting issues and whitespace in exceptions.py

This commit is contained in:
Paul Gauthier (aider) 2024-11-07 12:45:32 -08:00
parent bba9ca3d5a
commit 8d4175536f

View file

@ -1,5 +1,6 @@
from dataclasses import dataclass from dataclasses import dataclass
def retry_exceptions(): def retry_exceptions():
import httpx import httpx
import openai import openai
@ -37,6 +38,7 @@ class ExInfo:
retry: bool retry: bool
description: str description: str
EXCEPTIONS = [ EXCEPTIONS = [
ExInfo("APIConnectionError", True, None), ExInfo("APIConnectionError", True, None),
ExInfo("APIError", True, None), ExInfo("APIError", True, None),
@ -93,6 +95,5 @@ class LiteLLMExceptions:
return self.exceptions.get(ex.__class__) return self.exceptions.get(ex.__class__)
litellm_ex = LiteLLMExceptions() litellm_ex = LiteLLMExceptions()
litellm_ex._load(strict=True) litellm_ex._load(strict=True)