Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit 3e4ae8c

Browse files
author
Sai krishna
committed
lint
1 parent 32bf746 commit 3e4ae8c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

backend/modules/vector_db/chroma.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
from langchain.embeddings.base import Embeddings
99
from langchain_community.vectorstores import Chroma
1010

11-
from backend.constants import DATA_POINT_FQN_METADATA_KEY, DEFAULT_BATCH_SIZE_FOR_VECTOR_STORE
11+
from backend.constants import (
12+
DATA_POINT_FQN_METADATA_KEY,
13+
DEFAULT_BATCH_SIZE_FOR_VECTOR_STORE,
14+
)
1215
from backend.logger import logger
1316
from backend.modules.vector_db.base import BaseVectorDB
1417
from backend.types import ChromaVectorDBConfig, DataPointVector
@@ -104,7 +107,6 @@ def upsert_documents(
104107
for doc in documents
105108
if doc.metadata.get(DATA_POINT_FQN_METADATA_KEY)
106109
]
107-
108110

109111
def delete_documents(self, collection_name: str, document_ids: List[str]):
110112
# Fetch the collection

backend/modules/vector_db/qdrant.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,16 @@ def upsert_documents(
154154
)
155155

156156
# Delete old documents
157-
157+
158158
# If there are no record ids to be upserted, return
159159
if not len(record_ids_to_be_upserted):
160160
return
161-
161+
162162
logger.debug(
163163
f"[Qdrant] Deleting {len(documents)} outdated documents from collection {collection_name}"
164164
)
165165
for i in range(0, len(record_ids_to_be_upserted), BATCH_SIZE):
166-
record_ids_to_be_processed = record_ids_to_be_upserted[
167-
i : i + BATCH_SIZE
168-
]
166+
record_ids_to_be_processed = record_ids_to_be_upserted[i : i + BATCH_SIZE]
169167
self.qdrant_client.delete(
170168
collection_name=collection_name,
171169
points_selector=models.PointIdsList(
@@ -420,4 +418,3 @@ def list_document_vector_points(
420418
f"[Qdrant] Listing {len(document_vector_points)} document vector points for collection {collection_name}"
421419
)
422420
return document_vector_points
423-

0 commit comments

Comments
 (0)