Skip to content

Commit de6e829

Browse files
committed
lint
Signed-off-by: Anxhela Coba <acoba@redhat.com>
1 parent 5382997 commit de6e829

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/utils/reranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ def apply_byok_rerank_boost(
213213
key=lambda c: c.score if c.score is not None else float("-inf"),
214214
reverse=True,
215215
)
216-
return boosted
216+
return boosted

src/utils/vector_search.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
logger = get_logger(__name__)
2828

2929

30-
3130
def _filter_documents_for_chunks(
3231
all_documents: list[ReferencedDocument],
3332
final_chunks: list[RAGChunk],

tests/unit/utils/test_vector_search.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,7 @@ async def test_reranker_enabled_calls_cross_encoder(
760760
client_mock.vector_io.query.return_value = search_response
761761

762762
# Mock cross-encoder reranking function
763-
mock_rerank = mocker.patch(
764-
"utils.reranker.rerank_chunks_with_cross_encoder"
765-
)
763+
mock_rerank = mocker.patch("utils.reranker.rerank_chunks_with_cross_encoder")
766764
mock_rerank.return_value = [
767765
RAGChunk(content="BYOK content", source="rag_1", score=0.95)
768766
]
@@ -809,9 +807,7 @@ async def test_reranker_disabled_skips_cross_encoder(
809807
client_mock.vector_io.query.return_value = search_response
810808

811809
# Mock cross-encoder reranking function
812-
mock_rerank = mocker.patch(
813-
"utils.reranker.rerank_chunks_with_cross_encoder"
814-
)
810+
mock_rerank = mocker.patch("utils.reranker.rerank_chunks_with_cross_encoder")
815811

816812
context = await build_rag_context(client_mock, "passed", "test query", None)
817813

0 commit comments

Comments
 (0)