From e23e58f7f7e0a4c0caf06a3cbdfd4f324cf6c35a Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 4 Aug 2023 09:55:32 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(utils.py):=20simplify=20impo?= =?UTF-8?q?rt=5Fcustom=5Fcomponent=20function=20by=20directly=20importing?= =?UTF-8?q?=20the=20CustomComponent=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/importing/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/langflow/interface/importing/utils.py b/src/backend/langflow/interface/importing/utils.py index 0acb2cff5..d07222dd1 100644 --- a/src/backend/langflow/interface/importing/utils.py +++ b/src/backend/langflow/interface/importing/utils.py @@ -61,9 +61,7 @@ def import_by_type(_type: str, name: str) -> Any: def import_custom_component(custom_component: str) -> CustomComponent: """Import custom component from custom component name""" - return import_class( - f"langflow.interface.custom.custom_component.{custom_component}" - ) + return import_class("langflow.interface.custom.custom_component.CustomComponent") def import_output_parser(output_parser: str) -> Any: