From d4e5b4523706be7a02640bad824e17c561cfc4f2 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 20 Jun 2024 18:56:18 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(component.py):=20refactor?= =?UTF-8?q?=20import=20statement=20to=20improve=20readability=20and=20main?= =?UTF-8?q?tainability=20=E2=99=BB=EF=B8=8F=20(component.py):=20refactor?= =?UTF-8?q?=20method=20variable=20type=20annotation=20for=20better=20clari?= =?UTF-8?q?ty=20and=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/custom_component/component.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index 5b345024f..d75316218 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -1,17 +1,5 @@ import inspect -from typing import ( - TYPE_CHECKING, - Any, - AsyncIterator, - Awaitable, - Callable, - ClassVar, - Generator, - Iterator, - List, - Optional, - Union, -) +from typing import TYPE_CHECKING, Any, AsyncIterator, Callable, ClassVar, Generator, Iterator, List, Optional, Union from uuid import UUID import yaml @@ -124,7 +112,7 @@ class Component(CustomComponent): # Build the output if it's connected to some other vertex # or if it's not connected to any vertex if not vertex.outgoing_edges or output.name in vertex.edges_source_names: - method: Callable | Awaitable = getattr(self, output.method) + method: Callable = getattr(self, output.method) if output.cache and output.value != UNDEFINED: _results[output.name] = output.value else: