mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
Fix lint and type checker issues
- Remove unused imports (pytest, Mock) from test file - Add type ignore comment for ToolAnswerResult assignment Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -478,7 +478,7 @@ class Agent(BaseAgent):
|
||||
for tool_result in self.tools_results: # type: ignore # Item "None" of "list[Any] | None" has no attribute "__iter__" (not iterable)
|
||||
if tool_result.get("result_as_answer", False):
|
||||
from crewai.tools.tool_types import ToolAnswerResult
|
||||
result = ToolAnswerResult(tool_result["result"])
|
||||
result = ToolAnswerResult(tool_result["result"]) # type: ignore
|
||||
crewai_event_bus.emit(
|
||||
self,
|
||||
event=AgentExecutionCompletedEvent(agent=self, task=task, output=result),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch
|
||||
from unittest.mock import patch
|
||||
from crewai.agent import Agent
|
||||
from crewai.task import Task
|
||||
from crewai.tools.base_tool import BaseTool
|
||||
|
||||
Reference in New Issue
Block a user