Skip to content

Commit

Permalink
Auto-format
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Newton <[email protected]>
  • Loading branch information
Tom-Newton committed Dec 15, 2023
1 parent 613f9e7 commit 5fc0f47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions flytekit/core/python_function_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ def __init__(
self._execution_mode = execution_mode
self._node_dependency_hints = node_dependency_hints
if self._node_dependency_hints is not None and self._execution_mode != self.ExecutionBehavior.DYNAMIC:
raise ValueError("node_dependency_hints should only be used on dynamic tasks. On static tasks and "
"workflows its redundant because flyte can find the node dependencies automatically")
raise ValueError(
"node_dependency_hints should only be used on dynamic tasks. On static tasks and "
"workflows its redundant because flyte can find the node dependencies automatically"
)
self._wf = None # For dynamic tasks

@property
Expand Down
7 changes: 2 additions & 5 deletions tests/flytekit/unit/core/test_python_function_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from flytekit import task
from flytekit.configuration import Image, ImageConfig, SerializationSettings
from flytekit.core.pod_template import PodTemplate
from flytekit.core.python_auto_container import \
get_registerable_container_image
from flytekit.core.python_auto_container import get_registerable_container_image
from flytekit.core.python_function_task import PythonFunctionTask
from flytekit.core.tracker import isnested, istestfunction
from flytekit.image_spec.image_spec import ImageBuildEngine, ImageSpec
Expand Down Expand Up @@ -220,9 +219,7 @@ def test_node_dependency_hints_are_not_allowed():
def t1(i: str):
pass

with pytest.raises(
ValueError, match="node_dependency_hints should only be used on dynamic tasks"
):
with pytest.raises(ValueError, match="node_dependency_hints should only be used on dynamic tasks"):

@task(node_dependency_hints=[t1])
def t2(i: str):
Expand Down

0 comments on commit 5fc0f47

Please sign in to comment.