chore: fix lint errors (#2445)

* chore: Fix type hinting in ConditionalRouterComponent

* refactor: Update PassComponent to PassMessageComponent
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-30 11:51:09 -03:00
commit cd3f6c4c52
2 changed files with 4 additions and 4 deletions

View file

@ -70,7 +70,7 @@ class ConditionalRouterComponent(Component):
return self.message return self.message
else: else:
self.stop("true_result") self.stop("true_result")
return None return None # type: ignore
def false_response(self) -> Message: def false_response(self) -> Message:
result = self.evaluate_condition(self.input_text, self.match_text, self.operator, self.case_sensitive) result = self.evaluate_condition(self.input_text, self.match_text, self.operator, self.case_sensitive)
@ -79,4 +79,4 @@ class ConditionalRouterComponent(Component):
return self.message return self.message
else: else:
self.stop("false_result") self.stop("false_result")
return None return None # type: ignore

View file

@ -2,7 +2,7 @@ from .ConditionalRouter import ConditionalRouterComponent
from .FlowTool import FlowToolComponent from .FlowTool import FlowToolComponent
from .Listen import ListenComponent from .Listen import ListenComponent
from .Notify import NotifyComponent from .Notify import NotifyComponent
from .Pass import PassComponent from .Pass import PassMessageComponent
from .PythonFunction import PythonFunctionComponent from .PythonFunction import PythonFunctionComponent
from .RunFlow import RunFlowComponent from .RunFlow import RunFlowComponent
from .RunnableExecutor import RunnableExecComponent from .RunnableExecutor import RunnableExecComponent
@ -16,7 +16,7 @@ __all__ = [
"FlowToolComponent", "FlowToolComponent",
"ListenComponent", "ListenComponent",
"NotifyComponent", "NotifyComponent",
"PassComponent", "PassMessageComponent",
"PythonFunctionComponent", "PythonFunctionComponent",
"RunFlowComponent", "RunFlowComponent",
"RunnableExecComponent", "RunnableExecComponent",