Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions niworkflows/utils/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def listify(value):
[0.1, 0.2]
>>> listify(None) is None
True
>>> listify(1)
[1]

"""
from pathlib import Path
Expand All @@ -77,4 +79,6 @@ def listify(value):
return value
if isinstance(value, (str, bytes, Path)):
return [str(value)]
if isinstance(value, (int, float)):
return [value]
return list(value)
Loading