From 9688a507a3f8d4411bb2e08f4009e2695915f5d6 Mon Sep 17 00:00:00 2001 From: Medyan Date: Sat, 31 Jan 2026 16:55:38 -0500 Subject: [PATCH] fix format using poetry --- .../backend/api/features/library/db_test.py | 19 +++++++++++++++---- .../backend/backend/data/includes.py | 4 +++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/library/db_test.py b/autogpt_platform/backend/backend/api/features/library/db_test.py index af33eb0963..7429d71c19 100644 --- a/autogpt_platform/backend/backend/api/features/library/db_test.py +++ b/autogpt_platform/backend/backend/api/features/library/db_test.py @@ -368,7 +368,12 @@ async def test_list_library_agents_sort_by_last_executed(mocker): ) # Return agents in random order to verify sorting works - mock_library_agents = [library_agent3, library_agent1, library_agent4, library_agent2] + mock_library_agents = [ + library_agent3, + library_agent1, + library_agent4, + library_agent2, + ] # Mock prisma calls mock_agent_graph = mocker.patch("prisma.models.AgentGraph.prisma") @@ -391,7 +396,13 @@ async def test_list_library_agents_sort_by_last_executed(mocker): # 3. Agent 3 (no executions, created 1 day ago) - newer creation # 4. Agent 4 (no executions, created 2 days ago) - older creation assert len(result.agents) == 4 - assert result.agents[0].id == "lib1", "Agent with most recent execution should be first" + assert ( + result.agents[0].id == "lib1" + ), "Agent with most recent execution should be first" assert result.agents[1].id == "lib2", "Agent with older execution should be second" - assert result.agents[2].id == "lib3", "Agent without executions (newer) should be third" - assert result.agents[3].id == "lib4", "Agent without executions (older) should be last" + assert ( + result.agents[2].id == "lib3" + ), "Agent without executions (newer) should be third" + assert ( + result.agents[3].id == "lib4" + ), "Agent without executions (older) should be last" diff --git a/autogpt_platform/backend/backend/data/includes.py b/autogpt_platform/backend/backend/data/includes.py index 34cf085a1e..f7826c21bb 100644 --- a/autogpt_platform/backend/backend/data/includes.py +++ b/autogpt_platform/backend/backend/data/includes.py @@ -119,7 +119,9 @@ def library_agent_include( if include_executions: agent_graph_include["Executions"] = { "where": {"userId": user_id}, - "order_by": {"updatedAt": "desc"}, # Uses updatedAt because it reflects when the executioncompleted or last progressed + "order_by": { + "updatedAt": "desc" + }, # Uses updatedAt because it reflects when the executioncompleted or last progressed "take": execution_limit, }