mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-22 05:34:45 +08:00
fix: fix the lint check errors of the main branch (#403)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch
|
||||
from src.tools.crawl import crawl_tool
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user