From 19b84247cff426dfcee48b8e2118a6c979645808 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sun, 9 Jul 2023 11:08:50 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(custom.py):=20improve=20erro?= =?UTF-8?q?r=20message=20formatting=20for=20invalid=20entrypoint=20functio?= =?UTF-8?q?n=20name=20and=20return=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/custom.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/interface/custom/custom.py b/src/backend/langflow/interface/custom/custom.py index 05d9b732a..1ff79ca68 100644 --- a/src/backend/langflow/interface/custom/custom.py +++ b/src/backend/langflow/interface/custom/custom.py @@ -172,7 +172,10 @@ class CustomComponent(BaseModel): status_code=400, detail={ "error": "Invalid entrypoint function name", - "traceback": f"There needs to be at least one entrypoint function named '{self.function_entrypoint_name}' and it needs to return one of the types from this list {str(self.return_type_valid_list)}.", + "traceback": ( + f"There needs to be at least one entrypoint function named '{self.function_entrypoint_name}'" + f" and it needs to return one of the types from this list {str(self.return_type_valid_list)}.", + ), }, ) @@ -182,7 +185,10 @@ class CustomComponent(BaseModel): status_code=400, detail={ "error": "Invalid entrypoint function return", - "traceback": f"The entrypoint function return '{return_type}' needs to be an item from this list {str(self.return_type_valid_list)}.", + "traceback": ( + f"The entrypoint function return '{return_type}' needs to be an item " + f"from this list {str(self.return_type_valid_list)}." + ), }, )