From cc4008c861ef491723c2f695ff879e788e10f9c0 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 10 Aug 2023 11:43:46 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(custom=5Fcomponent.py):=20fi?= =?UTF-8?q?x=20incorrect=20usage=20of=20type=5Fhint=20variable=20in=20if?= =?UTF-8?q?=20condition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/custom_component.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index 74d06215f..4151f056d 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -50,8 +50,8 @@ class CustomComponent(Component, extra=Extra.allow): for type_hint in TYPE_HINT_LIST: if reader._is_type_hint_used_in_args( - "Optional", code - ) and not reader._is_type_hint_imported("Optional", code): + type_hint, code + ) and not reader._is_type_hint_imported(type_hint, code): error_detail = { "error": "Type hint Error", "traceback": f"Type hint '{type_hint}' is used but not imported in the code.",