Skip to content

Commit 33d1d5d

Browse files
fix(valkey): fix lint and staticmethod issues in test overrides
- Break long Document() lines to stay within 120-char limit - Remove @staticmethod from test_count_unique_metadata_by_filter_async_with_multiple_filters so pytest can inject the document_store fixture correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 635ef8c commit 33d1d5d

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

integrations/valkey/tests/test_document_store_async.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,15 @@ async def test_update_by_filter_async(self, document_store):
8787
"""Override: use declared metadata fields (category, priority) instead of filterable_docs fixture."""
8888
test_id = str(uuid.uuid4())[:8]
8989
docs = [
90-
Document(id=f"u1_{test_id}", content="doc 1", embedding=[0.1, 0.2, 0.3], meta={"category": "news", "priority": 1}),
91-
Document(id=f"u2_{test_id}", content="doc 2", embedding=[0.2, 0.3, 0.4], meta={"category": "blog", "priority": 2}),
92-
Document(id=f"u3_{test_id}", content="doc 3", embedding=[0.3, 0.4, 0.5], meta={"category": "news", "priority": 3}),
90+
Document(
91+
id=f"u1_{test_id}", content="doc 1", embedding=[0.1, 0.2, 0.3], meta={"category": "news", "priority": 1}
92+
),
93+
Document(
94+
id=f"u2_{test_id}", content="doc 2", embedding=[0.2, 0.3, 0.4], meta={"category": "blog", "priority": 2}
95+
),
96+
Document(
97+
id=f"u3_{test_id}", content="doc 3", embedding=[0.3, 0.4, 0.5], meta={"category": "news", "priority": 3}
98+
),
9399
]
94100
await document_store.write_documents_async(docs)
95101

@@ -104,9 +110,8 @@ async def test_update_by_filter_async(self, document_store):
104110
assert by_id[f"u2_{test_id}"].meta.get("status") is None
105111
assert by_id[f"u3_{test_id}"].meta.get("status") == "archived"
106112

107-
@staticmethod
108113
@pytest.mark.asyncio
109-
async def test_count_unique_metadata_by_filter_async_with_multiple_filters(document_store):
114+
async def test_count_unique_metadata_by_filter_async_with_multiple_filters(self, document_store):
110115
"""Override: use declared metadata fields (category, priority) instead of year."""
111116
test_id = str(uuid.uuid4())[:8]
112117
docs = [

0 commit comments

Comments
 (0)