remove bare list, dict, Sequence, None, Any (#25058)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Asuka Minato
2025-09-06 04:32:23 +09:00
committed by GitHub
parent 2b0695bdde
commit a78339a040
306 changed files with 787 additions and 817 deletions

View File

@@ -150,7 +150,7 @@ class MockTcvectordbClass:
filter: Optional[Filter] = None,
output_fields: Optional[list[str]] = None,
timeout: Optional[float] = None,
) -> list[dict]:
):
return [{"metadata": '{"doc_id":"foo1"}', "text": "text", "doc_id": "foo1", "score": 0.1}]
def collection_delete(
@@ -163,7 +163,7 @@ class MockTcvectordbClass:
):
return {"code": 0, "msg": "operation success"}
def drop_collection(self, database_name: str, collection_name: str, timeout: Optional[float] = None) -> dict:
def drop_collection(self, database_name: str, collection_name: str, timeout: Optional[float] = None):
return {"code": 0, "msg": "operation success"}

View File

@@ -26,7 +26,7 @@ def get_example_document(doc_id: str) -> Document:
@pytest.fixture
def setup_mock_redis() -> None:
def setup_mock_redis():
# get
ext_redis.redis_client.get = MagicMock(return_value=None)
@@ -48,7 +48,7 @@ class AbstractVectorTest:
self.example_doc_id = str(uuid.uuid4())
self.example_embedding = [1.001 * i for i in range(128)]
def create_vector(self) -> None:
def create_vector(self):
self.vector.create(
texts=[get_example_document(doc_id=self.example_doc_id)],
embeddings=[self.example_embedding],