Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jun 19, 2024
1 parent 1bd4cef commit 049b9b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cylc/flow/command_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@


from typing import (
Iterable,
List,
Optional,
)
Expand Down Expand Up @@ -230,7 +231,7 @@ def consistency(
raise InputError("Use --prerequisite or --output, not both.")


def is_tasks(tasks: List[str]):
def is_tasks(tasks: Iterable[str]):
"""All tasks in a list of tasks are task ID's
without trailing job ID.
Expand All @@ -249,7 +250,7 @@ def is_tasks(tasks: List[str]):
* */*/42
# None legal
>>> is_tasks(['1/', '*/baz/12'])
>>> is_tasks(['*/baz/12'])
Traceback (most recent call last):
...
Exception: This command does not take job ids:
Expand All @@ -258,7 +259,7 @@ def is_tasks(tasks: List[str]):
bad_tasks: List[str] = []
for task in tasks:
tokens = Tokens('//' + task)
if tokens.lowest_token == IDTokens.Job:
if tokens.lowest_token == IDTokens.Job.value:
bad_tasks.append(task)
if bad_tasks:
msg = 'This command does not take job ids:\n * '
Expand Down

0 comments on commit 049b9b3

Please sign in to comment.