fix erros reported by mypy

This commit is contained in:
italojohnny 2024-06-24 08:33:11 -03:00 • committed by Gabriel Luiz Freitas Almeida
commit 6ec39c8136
2 changed files with 13 additions and 11 deletions

View file

@ -1,17 +1,17 @@
from .AgentComponent import AgentComponent from .AgentComponent import AgentComponent
from .ConditionalRouter import ConditionalRouterComponent from .ConditionalRouter import ConditionalRouterComponent # type: ignore
from .ExtractKeyFromData import ExtractKeyFromDataComponent from .ExtractKeyFromData import ExtractKeyFromDataComponent
from .FlowTool import FlowToolComponent from .FlowTool import FlowToolComponent # type: ignore
from .Listen import ListenComponent from .Listen import ListenComponent # type: ignore
from .ListFlows import ListFlowsComponent from .ListFlows import ListFlowsComponent
from .MergeData import MergeDataComponent from .MergeData import MergeDataComponent
from .Notify import NotifyComponent from .Notify import NotifyComponent # type: ignore
from .PythonFunction import PythonFunctionComponent from .PythonFunction import PythonFunctionComponent # type: ignore
from .RunFlow import RunFlowComponent from .RunFlow import RunFlowComponent # type: ignore
from .RunnableExecutor import RunnableExecComponent from .RunnableExecutor import RunnableExecComponent
from .SelectivePassThrough import SelectivePassThroughComponent from .SelectivePassThrough import SelectivePassThroughComponent
from .SplitText import SplitTextComponent from .SplitText import SplitTextComponent # type: ignore
from .SQLExecutor import SQLExecutorComponent from .SQLExecutor import SQLExecutorComponent # type: ignore
from .SubFlow import SubFlowComponent from .SubFlow import SubFlowComponent
__all__ = [ __all__ = [

View file

@ -1,16 +1,18 @@
import uuid import uuid
from typing import Optional from typing import Optional, Any,
from langflow.custom import CustomComponent from langflow.custom import CustomComponent
from langflow.schema.dotdict import dotdict
class UUIDGeneratorComponent(CustomComponent): class UUIDGeneratorComponent(CustomComponent):
display_name = "ID Generator" display_name = "ID Generator"
description = "Generates a unique ID." description = "Generates a unique ID."
def update_build_config( def update_build_config( # type: ignore
self, self,
build_config: dict, build_config: dotdict,
field_value: Any,
field_name: Optional[str] = None, field_name: Optional[str] = None,
): ):
if field_name == "unique_id": if field_name == "unique_id":