Skip to content

Commit a27f1fd

Browse files
committed
Fix Mypy lint
1 parent dbdce6d commit a27f1fd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cylc/flow/task_job_mgr.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
Optional,
4545
Tuple,
4646
Union,
47+
cast,
4748
)
4849

4950
from cylc.flow import LOG
@@ -1231,8 +1232,14 @@ def _prep_submit_task_job(
12311232
rtconfig['remote']['host'] = host_n
12321233

12331234
try:
1234-
platform = get_platform(
1235-
rtconfig, itask.tdef.name, bad_hosts=self.bad_hosts
1235+
platform = cast(
1236+
# We know this is not None because eval_platform() or
1237+
# eval_host() called above ensure it is set or else we
1238+
# return early if the subshell is still evaluating.
1239+
'dict',
1240+
get_platform(
1241+
rtconfig, itask.tdef.name, bad_hosts=self.bad_hosts
1242+
),
12361243
)
12371244
except PlatformLookupError as exc:
12381245
itask.waiting_on_job_prep = False

0 commit comments

Comments
 (0)