Skip to content

Commit 8a583b3

Browse files
Merge pull request #5900 from cylc/8.2.x-sync
🤖 Merge 8.2.x-sync into master
2 parents 364ec42 + 69988b0 commit 8a583b3

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Quick summary of major changes:
9595

9696
[![License](https://img.shields.io/github/license/cylc/cylc-flow.svg?color=lightgrey)](https://github.com/cylc/cylc-flow/blob/master/COPYING)
9797

98-
Copyright (C) 2008-<span actions:bind='current-year'>2023</span> NIWA & British Crown (Met Office) & Contributors.
98+
Copyright (C) 2008-<span actions:bind='current-year'>2024</span> NIWA & British Crown (Met Office) & Contributors.
9999

100100
Cylc is free software: you can redistribute it and/or modify it under the terms
101101
of the GNU General Public License as published by the Free Software Foundation,

cylc/flow/id_cli.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ def _parse_cli(*ids: str) -> List[Tokens]:
104104
>>> parse_back('//cycle')
105105
Traceback (most recent call last):
106106
InputError: Relative reference must follow an incomplete one.
107-
E.G: workflow //cycle/task
108107
109108
>>> parse_back('workflow//cycle', '//cycle')
110109
Traceback (most recent call last):
111110
InputError: Relative reference must follow an incomplete one.
112-
E.G: workflow //cycle/task
111+
112+
>>> parse_back('workflow///cycle/')
113+
Traceback (most recent call last):
114+
InputError: Invalid ID: workflow///cycle/
113115
114116
"""
115117
# upgrade legacy ids if required
@@ -125,7 +127,11 @@ def _parse_cli(*ids: str) -> List[Tokens]:
125127
if id_.endswith('/') and not id_.endswith('//'): # noqa: SIM106
126128
# tolerate IDs that end in a single slash on the CLI
127129
# (e.g. CLI auto completion)
128-
tokens = Tokens(id_[:-1])
130+
try:
131+
# this ID is invalid with or without the trailing slash
132+
tokens = Tokens(id_[:-1])
133+
except ValueError:
134+
raise InputError(f'Invalid ID: {id_}')
129135
else:
130136
raise InputError(f'Invalid ID: {id_}')
131137
is_partial = tokens.get('workflow') and not tokens.get('cycle')

cylc/flow/scripts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
_copyright_year = 2023 # This is set by GH Actions update_copyright workflow
17+
_copyright_year = 2024 # This is set by GH Actions update_copyright workflow

0 commit comments

Comments
 (0)