style: apply ruff format fixes

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2026-05-25 07:03:42 +00:00
parent 158d962ea9
commit 2b60f3df16

View File

@@ -1132,20 +1132,21 @@ class Crew(FlowTrackable, BaseModel):
"warming shared prefix first",
)
first_agent, _ = agent_prompts[0]
if hasattr(first_agent, "llm") and hasattr(first_agent.llm, "preload_probe"):
if hasattr(first_agent, "llm") and hasattr(
first_agent.llm, "preload_probe"
):
first_agent.llm.preload_probe(prefix)
for agent, prompt in agent_prompts:
if hasattr(agent, "llm") and hasattr(agent.llm, "preload_probe"):
agent.llm.preload_probe(prompt)
return
else:
self._logger.log(
"info",
f"Cache preload: shared prefix too short ({len(prefix)} chars), "
"falling back to parallel strategy",
)
strategy = "parallel"
self._logger.log(
"info",
f"Cache preload: shared prefix too short ({len(prefix)} chars), "
"falling back to parallel strategy",
)
strategy = "parallel"
if strategy == "parallel":
with ThreadPoolExecutor(max_workers=min(len(agent_prompts), 4)) as pool: