From 0b19e7bf7695395c4f188a46ddc43faf09cb91a2 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Tue, 2 Jan 2024 10:49:42 +0330 Subject: [PATCH] fix: linter issues based on superlinter rules! --- discord_query.py | 2 +- subquery.py | 16 ++++++++-------- tests/unit/test_prepare_discord_query_engine.py | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/discord_query.py b/discord_query.py index b6ec65b..a630f7e 100644 --- a/discord_query.py +++ b/discord_query.py @@ -1,6 +1,6 @@ -from utils.query_engine.discord_query_engine import prepare_discord_engine_auto_filter from llama_index import QueryBundle from tc_hivemind_backend.embeddings.cohere import CohereEmbedding +from utils.query_engine.discord_query_engine import prepare_discord_engine_auto_filter def query_discord( diff --git a/subquery.py b/subquery.py index 1e3ef9c..cf4fa10 100644 --- a/subquery.py +++ b/subquery.py @@ -1,11 +1,11 @@ -from utils.query_engine import prepare_discord_engine_auto_filter -from llama_index.core import BaseQueryEngine from guidance.models import OpenAI as GuidanceOpenAI from llama_index import QueryBundle -from llama_index.tools import QueryEngineTool, ToolMetadata +from llama_index.core import BaseQueryEngine from llama_index.query_engine import SubQuestionQueryEngine from llama_index.question_gen.guidance_generator import GuidanceQuestionGenerator +from llama_index.tools import QueryEngineTool, ToolMetadata from tc_hivemind_backend.embeddings.cohere import CohereEmbedding +from utils.query_engine import prepare_discord_engine_auto_filter def query_multiple_source( @@ -51,11 +51,11 @@ def query_multiple_source( tools: list[ToolMetadata] = [] discord_query_engine: BaseQueryEngine - discourse_query_engine: BaseQueryEngine - gdrive_query_engine: BaseQueryEngine - notion_query_engine: BaseQueryEngine - telegram_query_engine: BaseQueryEngine - github_query_engine: BaseQueryEngine + # discourse_query_engine: BaseQueryEngine + # gdrive_query_engine: BaseQueryEngine + # notion_query_engine: BaseQueryEngine + # telegram_query_engine: BaseQueryEngine + # github_query_engine: BaseQueryEngine # query engine perparation # tools_metadata and query_engine_tools diff --git a/tests/unit/test_prepare_discord_query_engine.py b/tests/unit/test_prepare_discord_query_engine.py index 7ac1182..26816f1 100644 --- a/tests/unit/test_prepare_discord_query_engine.py +++ b/tests/unit/test_prepare_discord_query_engine.py @@ -1,6 +1,5 @@ import unittest import os -from unittest.mock import patch, Mock from utils.query_engine.discord_query_engine import prepare_discord_engine from llama_index.core import BaseQueryEngine from llama_index.vector_stores import ExactMatchFilter, FilterCondition, MetadataFilters