Skip to content

Commit e91f610

Browse files
committed
fix: replace unused loop variable with underscore
1 parent c7d669c commit e91f610

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/flare_ai_rag/retriever/qdrant_collection.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ def generate_collection(
3333
)
3434

3535
points = []
36-
for i, row in df_docs.iterrows():
37-
doc_id = str(i) # Convert index to string for ExtendedPointId compatibility
36+
for idx, (_, row) in enumerate(
37+
df_docs.iterrows(), start=1
38+
): # Using _ for unused variable
3839
content = row["Contents"]
3940

4041
if not isinstance(content, str):
@@ -80,8 +81,10 @@ def generate_collection(
8081
}
8182

8283
point = PointStruct(
83-
id=doc_id, vector=embedding, payload=payload
84-
) # Using string ID
84+
id=idx, # Using integer ID starting from 1
85+
vector=embedding,
86+
payload=payload,
87+
)
8588
points.append(point)
8689

8790
if points:

0 commit comments

Comments
 (0)