fix: remove unused Optional imports after UP045 migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sameer Kankute 2026-06-24 17:33:16 +05:30
parent ec91088775
commit 851ff30019
No known key found for this signature in database
19 changed files with 16 additions and 19 deletions

View file

@ -11,7 +11,6 @@ from typing import (
Dict,
List,
Literal,
Optional,
Tuple,
Union,
cast,

View file

@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union
import httpx

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
from litellm.llms.cohere.rerank.transformation import CohereRerankConfig
from litellm.types.rerank import OptionalRerankParams, RerankRequest

View file

@ -22,7 +22,7 @@ as supported only for gte-rerank-v2 / qwen3-vl-rerank.
Docs - https://help.aliyun.com/zh/model-studio/text-rerank-api
"""
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -2,7 +2,7 @@
Translate between Cohere's `/rerank` format and Deepinfra's `/rerank` format.
"""
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -4,7 +4,7 @@ Fireworks AI Rerank API transformation
Reference: https://docs.fireworks.ai/inference-api-reference/rerank
"""
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -1,5 +1,5 @@
import json
from typing import Any, List, Optional, Tuple
from typing import Any, List, Tuple
import os

View file

@ -2,7 +2,7 @@
Transformation logic for Hosted VLLM rerank
"""
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -1,5 +1,5 @@
import os
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union
import httpx
from typing_extensions import TypedDict

View file

@ -6,7 +6,7 @@ Why separate file? Make it easy to see how transformation works
Docs - https://jina.ai/reranker
"""
from typing import Any, Dict, List, Optional, Tuple, Union
from typing import Any, Dict, List, Tuple, Union
from httpx import URL, Response

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Literal, Optional, Union
from typing import Any, Dict, List, Literal, Union
import httpx
from typing_extensions import Required, TypedDict

View file

@ -4,7 +4,7 @@ Translates from Cohere's `/v1/rerank` input format to Vertex AI Discovery Engine
Why separate file? Make it easy to see how transformation works
"""
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
import httpx

View file

@ -4,7 +4,7 @@ Transformation logic for Voyage AI's /v1/rerank endpoint.
Docs - https://docs.voyageai.com/docs/reranker
"""
from typing import Any, Dict, List, Optional, Tuple, Union
from typing import Any, Dict, List, Tuple, Union
import httpx

View file

@ -5,7 +5,7 @@ Docs - https://cloud.ibm.com/apidocs/watsonx-ai#text-rerank
"""
import uuid
from typing import Any, Dict, List, Optional, Union, cast
from typing import Any, Dict, List, Union, cast
import httpx

View file

@ -4,7 +4,6 @@ This module is responsible for handling Getting/Setting the proxy server request
It allows fetching a dict of the proxy server request from s3 or GCS bucket.
"""
from typing import Optional
import litellm
from litellm import _custom_logger_compatible_callbacks_literal

View file

@ -11,7 +11,6 @@ from typing import (
Literal,
Mapping,
NamedTuple,
Optional,
Union,
)

View file

@ -1,7 +1,7 @@
import asyncio
import contextvars
from functools import partial
from typing import Any, Coroutine, Dict, List, Literal, Optional, Union
from typing import Any, Coroutine, Dict, List, Literal, Union
import litellm
from litellm._logging import verbose_logger

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional, Union
from typing import Any, Dict, List, Union
from litellm.llms.base_llm.rerank.transformation import BaseRerankConfig