Skip to content

Commit 3028828

Browse files
committed
Linting
1 parent d17d7f0 commit 3028828

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

pymongo_vectorsearch_utils/operation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def execute_search_query(
9292
{"$set": {"score": {"$meta": "vectorSearchScore"}}},
9393
]
9494

95-
9695
# Remove embeddings unless requested.
9796
if not include_embeddings:
9897
pipeline.append({"$project": {embedding_key: 0}})

tests/test_operation.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def client():
2424
yield client
2525
client.close()
2626

27+
2728
@pytest.fixture(scope="module")
2829
def preserved_collection(client):
2930
if COLLECTION_NAME not in client[DB_NAME].list_collection_names():
@@ -34,6 +35,7 @@ def preserved_collection(client):
3435
yield clxn
3536
clxn.delete_many({})
3637

38+
3739
@pytest.fixture
3840
def collection(client):
3941
if COLLECTION_NAME not in client[DB_NAME].list_collection_names():
@@ -325,7 +327,13 @@ def embeddings(texts):
325327
embedding_key="embedding",
326328
)
327329
# Add a document that should not be returned in searches
328-
preserved_collection.insert_one({'_id': ObjectId('68c1a038fd976373aa4ec19f'), 'category': 'fruit', 'color': 'red', 'embedding': [1.0, 1.0, 1.0]})
330+
preserved_collection.insert_one(
331+
{
332+
"category": "fruit",
333+
"color": "red",
334+
"embedding": [1.0, 1.0, 1.0],
335+
}
336+
)
329337
wait_for_docs_in_index(preserved_collection, VECTOR_INDEX_NAME, n_docs=5)
330338
return preserved_collection
331339

0 commit comments

Comments
 (0)