fix: Fix import sorting and type checking issues

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-14 21:13:06 +00:00
parent 2fbff69c81
commit c080227751
2 changed files with 7 additions and 1 deletions

View File

@@ -776,7 +776,12 @@ class Crew(BaseModel):
)
# Track delegation in hierarchical process
if self.process == Process.hierarchical and task.agent and task.agent != self.manager_agent:
if (
self.process == Process.hierarchical
and task.agent
and task.agent != self.manager_agent
and self.manager_agent
):
task.increment_delegations(self.manager_agent.role)
task.processed_by_agents.add(self.manager_agent.role)
self._logger.log(

View File

@@ -1,6 +1,7 @@
from crewai.agents.agent_builder.base_agent import BaseAgent
from crewai.tools.base_tool import BaseTool
from crewai.utilities import I18N, Logger
from .ask_question_tool import AskQuestionTool
from .delegate_work_tool import DelegateWorkTool