Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Apr 7, 2024
1 parent cfc27e5 commit b1150ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions flytekit/clis/sdk_in_container/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,4 @@ def print_agents_metadata():
agents = AgentRegistry.list_agents()
for agent in agents:
name = agent.name
task_type = "sync" if agent.is_sync else "async"
for task_category in agent.supported_task_categories:
click.secho(
f"Starting {name} supports {task_type} task {task_category.name} with version {task_category.version}",
fg="blue",
)
click.secho(f"Starting {name}...", fg="blue")
4 changes: 2 additions & 2 deletions tests/flytekit/unit/extend/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ def test_print_agents_metadata_output(list_agents_mock, mock_secho, sample_agent
list_agents_mock.return_value = sample_agents
print_agents_metadata()
expected_calls = [
(("Starting Sensor supports async task sensor with version 0",), {"fg": "blue"}),
(("Starting ChatGPT Agent supports sync task chatgpt with version 0",), {"fg": "blue"}),
(("Starting Sensor...",), {"fg": "blue"}),
(("Starting ChatGPT Agent...",), {"fg": "blue"}),
]
mock_secho.assert_has_calls(expected_calls, any_order=True)
assert mock_secho.call_count == len(expected_calls)

0 comments on commit b1150ed

Please sign in to comment.