Skip to content

Commit

Permalink
Merge pull request #6328 from cylc/8.3.x-sync
Browse files Browse the repository at this point in the history
🤖 Merge 8.3.x-sync into master
  • Loading branch information
MetRonnie authored Aug 27, 2024
2 parents b0fb246 + 20817a2 commit caa0466
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cylc/flow/prerequisite.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

"""Functionality for expressing and evaluating logical triggers."""

import math
import re
from typing import (
TYPE_CHECKING,
Expand Down Expand Up @@ -286,10 +285,10 @@ def api_dump(self) -> Optional[PbPrerequisite]:
for s_msg in self._satisfied
)
conds = []
num_length = math.ceil(len(self._satisfied) / 10)
num_length = len(str(len(self._satisfied)))
for ind, message_tuple in enumerate(sorted(self._satisfied)):
t_id = message_tuple.get_id()
char = 'c%.{0}d'.format(num_length) % ind
char = str(ind).zfill(num_length)
c_msg = self.MESSAGE_TEMPLATE % message_tuple
c_val = self._satisfied[message_tuple]
conds.append(
Expand Down
4 changes: 2 additions & 2 deletions tests/flakyfunctional/cylc-show/00-simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ cmp_json "${TEST_NAME}-taskinstance" "${TEST_NAME}-taskinstance" \
"runtime": {"completion": "(started and succeeded)"},
"prerequisites": [
{
"expression": "c0",
"expression": "0",
"conditions": [
{
"exprAlias": "c0",
"exprAlias": "0",
"taskId": "20141106T0900Z/bar",
"reqState": "succeeded",
"message": "satisfied naturally",
Expand Down

0 comments on commit caa0466

Please sign in to comment.