From 9a32083bffc7a5ecce0c376d993efa454728eddf Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Wed, 25 Dec 2024 08:13:52 -0600 Subject: [PATCH] allow lists to UItuple --- lenskit/lenskit/data/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenskit/lenskit/data/types.py b/lenskit/lenskit/data/types.py index 6ddcd86ca..566c64445 100644 --- a/lenskit/lenskit/data/types.py +++ b/lenskit/lenskit/data/types.py @@ -79,7 +79,7 @@ def create(cls, x: UITuple[T] | tuple[T, T] | T) -> UITuple[T]: """ if isinstance(x, UITuple): return cast(UITuple[T], x) - elif isinstance(x, tuple): + elif isinstance(x, (tuple, list)): u, i = cast(tuple[T, T], x) return UITuple(u, i) else: