Skip to content

Commit

Permalink
fix: linter issues!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Apr 23, 2024
1 parent 21ed6d4 commit 261c8af
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bot/retrievers/custom_retriever.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
We're going to override the `_build_node_list_from_query_result` since it is raising errors having the llama-index legacy & newer version together
We're going to override the `_build_node_list_from_query_result`
since it is raising errors having the llama-index legacy & newer version together
"""

from llama_index.core.data_structs.data_structs import IndexDict
Expand All @@ -12,7 +13,6 @@


class CustomVectorStoreRetriever(VectorIndexRetriever):

def _build_node_list_from_query_result(
self, query_result: VectorStoreQueryResult
) -> list[NodeWithScore]:
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_base_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class TestBaseEngine(TestCase):

def test_setup_vector_store_index(self):
"""
Tests that _setup_vector_store_index creates a PGVectorAccess object
Expand Down
2 changes: 1 addition & 1 deletion utils/query_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# flake8: noqa
from .github import GitHubQueryEngine
from .prepare_discord_query_engine import prepare_discord_engine_auto_filter
from .subquery_gen_prompt import DEFAULT_GUIDANCE_SUB_QUESTION_PROMPT_TMPL
from .github import GitHubQueryEngine
1 change: 0 additions & 1 deletion utils/query_engine/base_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class BaseEngine:

@classmethod
def _setup_vector_store_index(
cls,
Expand Down
6 changes: 3 additions & 3 deletions utils/query_engine/github.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from utils.query_engine.base_engine import BaseEngine
from llama_index.core.query_engine import RetrieverQueryEngine
from bot.retrievers.custom_retriever import CustomVectorStoreRetriever
from llama_index.core import get_response_synthesizer
from bot.retrievers.utils.load_hyperparams import load_hyperparams
from llama_index.core import get_response_synthesizer
from llama_index.core.query_engine import RetrieverQueryEngine
from utils.query_engine.base_engine import BaseEngine


class GitHubQueryEngine(BaseEngine):
Expand Down

0 comments on commit 261c8af

Please sign in to comment.