fix: fix the lint check errors of the main branch (#403)

This commit is contained in:
Willem Jiang
2025-07-12 14:43:25 +08:00
committed by GitHub
parent 2363b21447
commit 3c46201ff0
27 changed files with 21 additions and 128 deletions

View File

@@ -1,6 +1,7 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
from .loader import load_yaml_config
from .tools import SELECTED_SEARCH_ENGINE, SearchEngine
from .questions import BUILT_IN_QUESTIONS, BUILT_IN_QUESTIONS_ZH_CN
@@ -45,4 +46,5 @@ __all__ = [
"SearchEngine",
"BUILT_IN_QUESTIONS",
"BUILT_IN_QUESTIONS_ZH_CN",
load_yaml_config,
]

View File

@@ -1,7 +1,6 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
import sys
from .article import Article
from .jina_client import JinaClient

View File

@@ -4,7 +4,6 @@
from pathlib import Path
from typing import Any, Dict
import os
import ssl
import httpx
from langchain_openai import ChatOpenAI

View File

@@ -3,11 +3,11 @@
import logging
from langchain.schema import HumanMessage, SystemMessage
from langchain.schema import HumanMessage
from src.config.agents import AGENT_LLM_MAP
from src.llms.llm import get_llm_by_type
from src.prompts.template import env, apply_prompt_template
from src.prompts.template import apply_prompt_template
from src.prompt_enhancer.graph.state import PromptEnhancerState
logger = logging.getLogger(__name__)

View File

@@ -48,12 +48,12 @@ class VikingDBKnowledgeBaseProvider(Retriever):
if params:
for key in params:
if (
type(params[key]) == int
or type(params[key]) == float
or type(params[key]) == bool
type(params[key]) is int
or type(params[key]) is float
or type(params[key]) is bool
):
params[key] = str(params[key])
elif type(params[key]) == list:
elif type(params[key]) is list:
if not doseq:
params[key] = ",".join(params[key])

View File

@@ -1,7 +1,6 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
import json
import logging
import os
from typing import List, Optional