From 6ec39c81361d3c48471ad836f029bd2e2af7f28e Mon Sep 17 00:00:00 2001 From: italojohnny Date: Mon, 24 Jun 2024 08:33:11 -0300 Subject: [PATCH] fix erros reported by mypy --- .../langflow/components/deactivated/__init__.py | 16 ++++++++-------- .../langflow/components/helpers/IDGenerator.py | 8 +++++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/backend/base/langflow/components/deactivated/__init__.py b/src/backend/base/langflow/components/deactivated/__init__.py index 28cf78d1b..123ff23b9 100644 --- a/src/backend/base/langflow/components/deactivated/__init__.py +++ b/src/backend/base/langflow/components/deactivated/__init__.py @@ -1,17 +1,17 @@ from .AgentComponent import AgentComponent -from .ConditionalRouter import ConditionalRouterComponent +from .ConditionalRouter import ConditionalRouterComponent # type: ignore from .ExtractKeyFromData import ExtractKeyFromDataComponent -from .FlowTool import FlowToolComponent -from .Listen import ListenComponent +from .FlowTool import FlowToolComponent # type: ignore +from .Listen import ListenComponent # type: ignore from .ListFlows import ListFlowsComponent from .MergeData import MergeDataComponent -from .Notify import NotifyComponent -from .PythonFunction import PythonFunctionComponent -from .RunFlow import RunFlowComponent +from .Notify import NotifyComponent # type: ignore +from .PythonFunction import PythonFunctionComponent # type: ignore +from .RunFlow import RunFlowComponent # type: ignore from .RunnableExecutor import RunnableExecComponent from .SelectivePassThrough import SelectivePassThroughComponent -from .SplitText import SplitTextComponent -from .SQLExecutor import SQLExecutorComponent +from .SplitText import SplitTextComponent # type: ignore +from .SQLExecutor import SQLExecutorComponent # type: ignore from .SubFlow import SubFlowComponent __all__ = [ diff --git a/src/backend/base/langflow/components/helpers/IDGenerator.py b/src/backend/base/langflow/components/helpers/IDGenerator.py index d55c4f71e..fa8805583 100644 --- a/src/backend/base/langflow/components/helpers/IDGenerator.py +++ b/src/backend/base/langflow/components/helpers/IDGenerator.py @@ -1,16 +1,18 @@ import uuid -from typing import Optional +from typing import Optional, Any, from langflow.custom import CustomComponent +from langflow.schema.dotdict import dotdict class UUIDGeneratorComponent(CustomComponent): display_name = "ID Generator" description = "Generates a unique ID." - def update_build_config( + def update_build_config( # type: ignore self, - build_config: dict, + build_config: dotdict, + field_value: Any, field_name: Optional[str] = None, ): if field_name == "unique_id":