From cd2e281193515913335dbcd218fe81fc0fd8037f Mon Sep 17 00:00:00 2001 From: abhi1992002 Date: Tue, 17 Feb 2026 10:30:09 +0530 Subject: [PATCH] refactor(api): clean up imports and add spacing for readability - Removed duplicate import of `FolderValidationError` in `rest_api.py` to streamline the code. - Added a blank line in `db.py` before the `list_folders` function to enhance code readability. - These changes improve the organization and clarity of the API codebase. --- autogpt_platform/backend/backend/api/features/library/db.py | 1 + autogpt_platform/backend/backend/api/rest_api.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autogpt_platform/backend/backend/api/features/library/db.py b/autogpt_platform/backend/backend/api/features/library/db.py index 577412ec2a..4c0de561c5 100644 --- a/autogpt_platform/backend/backend/api/features/library/db.py +++ b/autogpt_platform/backend/backend/api/features/library/db.py @@ -952,6 +952,7 @@ async def add_store_agent_to_library( ############ Folder DB Functions ############# ############################################## + async def list_folders( user_id: str, parent_id: Optional[str] = None, diff --git a/autogpt_platform/backend/backend/api/rest_api.py b/autogpt_platform/backend/backend/api/rest_api.py index bc41cf25dc..fc063ad5c6 100644 --- a/autogpt_platform/backend/backend/api/rest_api.py +++ b/autogpt_platform/backend/backend/api/rest_api.py @@ -45,13 +45,13 @@ from backend.api.features.chat.completion_consumer import ( start_completion_consumer, stop_completion_consumer, ) +from backend.api.features.library.exceptions import FolderValidationError from backend.blocks.llm import DEFAULT_LLM_MODEL from backend.data.model import Credentials from backend.integrations.providers import ProviderName from backend.monitoring.instrumentation import instrument_fastapi from backend.util import json from backend.util.cloud_storage import shutdown_cloud_storage_handler -from backend.api.features.library.exceptions import FolderValidationError from backend.util.exceptions import ( MissingConfigError, NotAuthorizedError,