fix: ruff formatting and mypy type error

Run ruff format on agent_tui.py, cli.py, executor.py. Fix agents_dir
argument type: pass Path object instead of str to match the
load_agent_from_definition signature (Path | None).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Joao Moura
2026-05-14 17:48:30 -04:00
parent 1c6a190046
commit db604b6f32
3 changed files with 18 additions and 13 deletions

View File

@@ -236,7 +236,7 @@ def _train_new_agents(agent_files: list[Any], n_iterations: int) -> None:
from crewai.new_agent.definition_parser import load_agent_from_definition
agent = load_agent_from_definition(
str(agent_path), agents_dir=str(agent_path.parent)
str(agent_path), agents_dir=agent_path.parent
)
except Exception as e:
click.secho(f" Error loading agent {agent_name}: {e}", fg="red")
@@ -992,7 +992,9 @@ def _test_new_agents(
if progress is None:
raise RuntimeError("progress must not be None in non-verbose mode")
progress.start(iteration=iteration)
output_ctx = VerboseBenchmarkOutput() if verbose else SuppressBenchmarkOutput()
output_ctx = (
VerboseBenchmarkOutput() if verbose else SuppressBenchmarkOutput()
)
with ArtifactsSandbox(), output_ctx:
all_results = _loop.run_until_complete(_run_all())
finally: