Skip to content

Commit

Permalink
add explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jun 23, 2023
1 parent 1bf9e2b commit cb47f4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cylc/flow/param_expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def expand(template, params, results, values=None):
REC_P_ALL = re.compile(r"(%s)?(?:<(.*?)>)?(.+)?" % TaskID.NAME_RE)
# To extract all parameter lists e.g. 'm,n,o' (from '<m,n,o>').
REC_P_GROUP = re.compile(r"<(.*?)>")
# As REC_P_ALL, but retaining <> so that we can tell which bits of re.split
# are templates, and which are plain text:
REC_P_MATCH = re.compile(r'(<[^>]*>)')
# To extract parameter name and optional offset or value e.g. 'm-1'.
REC_P_OFFS = re.compile(
Expand Down Expand Up @@ -239,7 +241,6 @@ def _parse_task_name_string(parent):
(['i = cat', 'j=3'], 'FAM{i}{j}')
"""
tmpl_list = REC_P_MATCH.split(parent)

param_list = []
for template in tmpl_list:
group = REC_P_GROUP.findall(template)
Expand Down

0 comments on commit cb47f4f

Please sign in to comment.