Skip to content

Commit 5f4c36f

Browse files
committed
Type annotations
1 parent 71d14b1 commit 5f4c36f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cylc/flow/config.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
Dict,
4343
Iterable,
4444
List,
45+
Literal,
4546
Mapping,
4647
Optional,
4748
Set,
@@ -468,7 +469,9 @@ def __init__(
468469

469470
# after the call to init_cyclers, we can start getting proper points.
470471
init_cyclers(self.cfg)
471-
self.cycling_type = get_interval_cls().get_null().TYPE
472+
self.cycling_type: Literal['integer', 'iso8601'] = (
473+
get_interval_cls().get_null().TYPE
474+
)
472475
self.cycle_point_dump_format = get_dump_format(self.cycling_type)
473476

474477
# Initial point from workflow definition (or CLI override above).
@@ -756,7 +759,7 @@ def process_initial_cycle_point(self) -> None:
756759
if orig_icp is None:
757760
orig_icp = '1'
758761
icp = orig_icp
759-
elif self.cycling_type == ISO8601_CYCLING_TYPE:
762+
else:
760763
if orig_icp is None:
761764
raise WorkflowConfigError(
762765
"This workflow requires an initial cycle point.")

0 commit comments

Comments
 (0)