Skip to content

Commit

Permalink
attributes creates and requires in the task hook can be given as …
Browse files Browse the repository at this point in the history
…yaml list now
  • Loading branch information
jhidding committed Sep 17, 2024
1 parent 11d0656 commit 8b16927
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entangled/hooks/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@


def ensure_list(strs: str | list[str]) -> list[str]:
"""Some options may be given either as a list or as a single string,
where the string is supposed to have a whitespace separated list.
This function converts from either to a list of strings.
"""
if isinstance(strs, str):
return strs.split()
elif isinstance(strs, list):
Expand Down

0 comments on commit 8b16927

Please sign in to comment.