diff --git a/dff/pipeline/pipeline/actor.py b/dff/pipeline/pipeline/actor.py index 7825399d1..6cde5b8f0 100644 --- a/dff/pipeline/pipeline/actor.py +++ b/dff/pipeline/pipeline/actor.py @@ -60,6 +60,7 @@ "processing": ((Any, Any), Any), } + def error_handler(error_msgs: list, msg: str, exception: Optional[Exception] = None, logging_flag: bool = True): """ This function handles errors during :py:class:`~dff.script.Script` validation. @@ -467,13 +468,7 @@ def validate_script(self, logging_flag: bool = True): # validate labeling for label in node.transitions.keys(): if callable(label): - error_msgs += validate_callable( - label, - "label", - flow_name, - node_name, - logging_flag - ) + error_msgs += validate_callable(label, "label", flow_name, node_name, logging_flag) else: norm_label = normalize_label(label, flow_name) if norm_label is None: diff --git a/tests/pipeline/test_pipeline.py b/tests/pipeline/test_pipeline.py index 6b424b313..8cf96f551 100644 --- a/tests/pipeline/test_pipeline.py +++ b/tests/pipeline/test_pipeline.py @@ -1,5 +1,4 @@ import importlib -import pytest from dff.script import Message from tests.test_utils import get_path_from_tests_to_current_dir diff --git a/tutorials/script/core/8_misc.py b/tutorials/script/core/8_misc.py index 5d82558af..69ef69afc 100644 --- a/tutorials/script/core/8_misc.py +++ b/tutorials/script/core/8_misc.py @@ -35,9 +35,10 @@ # %% def custom_response(ctx: Context, _: Pipeline) -> Message: current_node = ctx.current_node + current_misc = current_node.misc if current_node is not None else None return Message( text=f"ctx.last_label={ctx.last_label}: " - f"current_node.misc={current_node.misc if current_node is not None else None}" + f"current_node.misc={current_misc}" )