cleaned base and optional unuseful

This commit is contained in:
Yannick Stephan
2025-02-09 10:32:59 +01:00
parent 50c7f26262
commit d267f06602

View File

@@ -5,14 +5,9 @@ from typing import (
Union, Union,
Literal, Literal,
TypeVar, TypeVar,
Optional,
Dict,
Any, Any,
List,
) )
from enum import Enum
import numpy as np
from .utils import EmbeddingFunc from .utils import EmbeddingFunc
@@ -88,10 +83,10 @@ class BaseKVStorage(StorageNameSpace):
async def all_keys(self) -> list[str]: async def all_keys(self) -> list[str]:
raise NotImplementedError raise NotImplementedError
async def get_by_id(self, id: str) -> Union[dict[str, Any], None]: async def get_by_id(self, id: str) -> dict[str, Any]:
raise NotImplementedError raise NotImplementedError
async def get_by_ids(self, ids: list[str]) -> list[Union[dict[str, Any], None]]: async def get_by_ids(self, ids: list[str]) -> list[dict[str, Any]]:
raise NotImplementedError raise NotImplementedError
async def filter_keys(self, data: list[str]) -> set[str]: async def filter_keys(self, data: list[str]) -> set[str]:
@@ -104,7 +99,7 @@ class BaseKVStorage(StorageNameSpace):
async def drop(self) -> None: async def drop(self) -> None:
raise NotImplementedError raise NotImplementedError
async def get_by_status_and_ids( async def get_by_status(
self, status: str self, status: str
) -> Union[list[dict[str, Any]], None]: ) -> Union[list[dict[str, Any]], None]:
raise NotImplementedError raise NotImplementedError