From a3a2861069894bf933659936f418c22d5d76f90d Mon Sep 17 00:00:00 2001 From: Eachan Johnson Date: Tue, 23 Apr 2024 09:37:56 +0100 Subject: [PATCH] Fix list casting --- carabiner/cast.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/carabiner/cast.py b/carabiner/cast.py index b61ee7f..5369403 100644 --- a/carabiner/cast.py +++ b/carabiner/cast.py @@ -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