Skip to content

Commit a5774b0

Browse files
author
Alan Christie
committed
dev: fix build
1 parent cde958a commit a5774b0

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

workflow/workflow_engine.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
import logging
7272
import sys
73-
from dataclasses import dataclass
73+
from dataclasses import dataclass, field
7474
from typing import Any, Optional
7575

7676
import decoder.decoder as job_definition_decoder
@@ -117,12 +117,12 @@ class StepPreparationResponse:
117117
should contain something useful."""
118118

119119
replicas: int
120-
variables: dict[str, Any] | None = None
121120
replica_variable: str | None = None
122-
replica_values: list[str] | None = None
123-
dependent_instances: set[str] = set()
124-
outputs: set[str] = set()
125-
inputs: set[str] = set()
121+
variables: dict[str, Any] = field(default_factory=dict)
122+
replica_values: list[str] = field(default_factory=list)
123+
dependent_instances: set[str] = field(default_factory=set)
124+
outputs: set[str] = field(default_factory=set)
125+
inputs: set[str] = field(default_factory=set)
126126
error_num: int = 0
127127
error_msg: str | None = None
128128

@@ -217,7 +217,6 @@ def _handle_workflow_start_message(self, r_wfid: str) -> None:
217217
sp_resp = self._prepare_step(
218218
wf=wf_response, step_definition=first_step, rwf=rwf_response
219219
)
220-
assert sp_resp.variables is not None
221220
assert sp_resp.error_msg is None
222221
# Launch it.
223222
# If there's a launch problem the step (and running workflow) will have
@@ -392,7 +391,6 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
392391
)
393392
return
394393

395-
assert sp_resp.variables is not None
396394
self._launch(
397395
rwf=rwf_response,
398396
step_definition=next_step,
@@ -787,7 +785,6 @@ def _launch(
787785
assert total_replicas >= 1
788786

789787
variables = step_preparation_response.variables
790-
assert variables is not None
791788
for replica in range(step_preparation_response.replicas):
792789

793790
# If we are replicating this step more than once

0 commit comments

Comments
 (0)