From 9365ffd83592f017269cfff4e63ff51453077d02 Mon Sep 17 00:00:00 2001 From: dajiaohuang Date: Thu, 10 Sep 2026 12:12:28 +0800 Subject: [PATCH] fix: satisfy ruff optional annotations --- litellm/vector_stores/vector_store_registry.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/vector_stores/vector_store_registry.py b/litellm/vector_stores/vector_store_registry.py index d6fa3e9ea28..2d4d5fe5749 100644 --- a/litellm/vector_stores/vector_store_registry.py +++ b/litellm/vector_stores/vector_store_registry.py @@ -6,7 +6,6 @@ from typing import ( TYPE_CHECKING, Any, # noqa: TID251 # untyped non_default_params dict is the only source of the unknown key type Final, - Optional, cast, # noqa: TID251 # untyped non_default_params dict is the only source of the unknown key type get_args, ) @@ -35,7 +34,7 @@ else: class VectorStoreIndexRegistry: def __init__( self, - vector_store_indexes: Optional[list[LiteLLM_ManagedVectorStoreIndex]] = None, + vector_store_indexes: list[LiteLLM_ManagedVectorStoreIndex] | None = None, ): self.vector_store_indexes: list[LiteLLM_ManagedVectorStoreIndex] = ( vector_store_indexes if vector_store_indexes is not None else [] @@ -109,7 +108,7 @@ class VectorStoreIndexRegistry: class VectorStoreRegistry: def __init__( self, - vector_stores: Optional[list[LiteLLM_ManagedVectorStore]] = None, + vector_stores: list[LiteLLM_ManagedVectorStore] | None = None, ): self.vector_stores: list[LiteLLM_ManagedVectorStore] = vector_stores if vector_stores is not None else [] self.vector_store_ids_to_vector_store_map: dict[str, LiteLLM_ManagedVectorStore] = {}