Skip to content

Commit

Permalink
Fix Mypy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jan 20, 2025
1 parent dbdce6d commit a27f1fd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
Optional,
Tuple,
Union,
cast,
)

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

try:
platform = get_platform(
rtconfig, itask.tdef.name, bad_hosts=self.bad_hosts
platform = cast(
# We know this is not None because eval_platform() or
# eval_host() called above ensure it is set or else we
# return early if the subshell is still evaluating.
'dict',
get_platform(
rtconfig, itask.tdef.name, bad_hosts=self.bad_hosts
),
)
except PlatformLookupError as exc:
itask.waiting_on_job_prep = False
Expand Down

0 comments on commit a27f1fd

Please sign in to comment.