Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove c char from prereq API dump #6305

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Iterable, Set, TYPE_CHECKING

Expand Down Expand Up @@ -232,11 +231,11 @@ def api_dump(self):
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)):
point, name = message_tuple[0:2]
t_id = quick_relative_detokenise(point, name)
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]
c_bool = bool(c_val)
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
Loading