Skip to content

Commit

Permalink
Fix list casting
Browse files Browse the repository at this point in the history
  • Loading branch information
eachanjohnson committed Apr 23, 2024
1 parent 9d7ec53 commit a3a2861
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion carabiner/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def clist(x) -> List:
"""

return list(x)
try:
return list(x)
except TypeError: ## if x is not iterable
return [x]


@clist.register
Expand Down

0 comments on commit a3a2861

Please sign in to comment.