Skip to content
Snippets Groups Projects
Commit 12561ee8 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

FIX: toSequence fails for `None`

parent 920cb9d3
No related branches found
No related tags found
1 merge request!462More tests
......@@ -43,6 +43,8 @@ def assertScalar(name, value, optional=False):
def toSequence(value: T | Sequence[T]) -> List[T]:
if value is None: # special case
return [None]
if isinstance(value, T.__constraints__):
return [value]
return list(value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment