Skip to content

Commit 6ab3d7d

Browse files
committed
lint
1 parent 92e4c74 commit 6ab3d7d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

libs/knowledge-store/ragstack_knowledge_store/graph_store.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ def fetch_initial_candidates() -> None:
484484
if tag_filter.len() == 0:
485485
outgoing_tags[row.content_id] = set(row.link_to_tags or [])
486486
else:
487-
outgoing_tags[row.content_id] = tag_filter.intersection(set(row.link_to_tags or []))
487+
outgoing_tags[row.content_id] = tag_filter.intersection(
488+
set(row.link_to_tags or [])
489+
)
488490
helper.add_candidates(candidates)
489491

490492
if initial_roots:

libs/knowledge-store/tests/integration_tests/test_graph_store.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,14 @@ def test_mmr_traversal(
211211
results = gs.mmr_traversal_search("0.0", fetch_k=2, k=4, initial_roots=["v0"])
212212
assert _result_ids(results) == ["v1", "v3", "v2"]
213213

214-
results = gs.mmr_traversal_search("0.0", k=2, fetch_k=2, tag_filter=set(("explicit", "link")))
214+
results = gs.mmr_traversal_search(
215+
"0.0", k=2, fetch_k=2, tag_filter={("explicit", "link")}
216+
)
215217
assert _result_ids(results) == ["v0", "v2"]
216218

217-
results = gs.mmr_traversal_search("0.0", k=2, fetch_k=2, tag_filter=set(("no", "match")))
219+
results = gs.mmr_traversal_search(
220+
"0.0", k=2, fetch_k=2, tag_filter={("no", "match")}
221+
)
218222
assert _result_ids(results) == []
219223

220224

0 commit comments

Comments
 (0)