Skip to content

Commit bf95f75

Browse files
committed
Fix.
1 parent 696e931 commit bf95f75

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/_pytask/execute.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ def pytask_execute_task_setup(session: Session, task: PTask) -> None: # noqa: C
140140
node = dag.nodes[node_signature].get("task") or dag.nodes[
141141
node_signature
142142
].get("node")
143+
144+
# Skip provisional nodes that are products since they do not have a state.
145+
if node_signature not in predecessors and isinstance(
146+
node, PProvisionalNode
147+
):
148+
continue
149+
143150
node_state = node.state()
144151
if node_signature in predecessors and not node_state:
145152
msg = f"{task.name!r} requires missing node {node.name!r}."
@@ -150,12 +157,6 @@ def pytask_execute_task_setup(session: Session, task: PTask) -> None: # noqa: C
150157
)
151158
raise NodeNotFoundError(msg)
152159

153-
# Skip provisional nodes that are products since they do not have a state.
154-
if node_signature not in predecessors and isinstance(
155-
node, PProvisionalNode
156-
):
157-
continue
158-
159160
has_changed = has_node_changed(task=task, node=node, state=node_state)
160161
if has_changed:
161162
needs_to_be_executed = True

0 commit comments

Comments
 (0)