Skip to content

Commit

Permalink
lint applied
Browse files Browse the repository at this point in the history
  • Loading branch information
pseusys committed Feb 7, 2024
1 parent 79ae0b1 commit 913887e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions dff/pipeline/pipeline/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion tests/pipeline/test_pipeline.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion tutorials/script/core/8_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
)


Expand Down

0 comments on commit 913887e

Please sign in to comment.