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,4 +1,3 @@
import pytest
from unittest.mock import Mock, patch
from src.tools.crawl import crawl_tool

View File

@@ -1,10 +1,8 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
import pytest
import logging
from unittest.mock import Mock, call, patch, MagicMock
from src.tools.decorators import LoggedToolMixin, create_logged_tool
from unittest.mock import Mock, call, patch
from src.tools.decorators import create_logged_tool
class MockBaseTool:
@@ -58,7 +56,7 @@ class TestLoggedToolMixin:
tool = LoggedTool()
with patch("src.tools.decorators.logger.debug") as mock_debug:
result = tool._run("test_arg")
tool._run("test_arg")
# Verify debug log was called with correct message
mock_debug.assert_has_calls(

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
import pytest
from unittest.mock import Mock, patch, MagicMock
from unittest.mock import patch
from src.tools.python_repl import python_repl_tool

View File

@@ -3,7 +3,7 @@
import os
import pytest
from unittest.mock import patch, MagicMock
from unittest.mock import patch
from src.tools.search import get_web_search_tool
from src.config import SearchEngine

View File

@@ -3,7 +3,6 @@
import json
import pytest
from unittest.mock import Mock, patch, AsyncMock, MagicMock
import aiohttp
import requests
from src.tools.tavily_search.tavily_search_api_wrapper import (
EnhancedTavilySearchAPIWrapper,

View File

@@ -4,7 +4,6 @@
import json
import pytest
from unittest.mock import Mock, patch, AsyncMock
from typing import Dict, Any
from src.tools.tavily_search.tavily_search_results_with_images import (
TavilySearchResultsWithImages,
)

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
# SPDX-License-Identifier: MIT
from unittest.mock import Mock, patch, MagicMock
from unittest.mock import Mock, patch
from langchain_core.callbacks import (
CallbackManagerForToolRun,
AsyncCallbackManagerForToolRun,