Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/wxflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def cast_as_dtype(string: str) -> Union[str, int, float, bool, Any]:

if ',' in string:
# Convert comma-separated list to python list
return [cast_as_dtype(elem.strip()) for elem in string.split(',')]
return [cast_as_dtype(elem.strip()) for elem in string.split(',') if elem.strip() != '']

def _cast_or_not(to_type: Any, string: str):
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
export SOME_BOOL6=.F.
export SOME_LIST1="3, 15, -999"
export SOME_LIST2="0.2,3.5,-9999."
export SOME_LIST3="20221225, 202212251845"
export SOME_LIST3="20221225, 202212251845,"
export SOME_LIST4="YES, .false., .T."
export SOME_LIST5="0.2, test_str, 15, 20221225, NO"
"""
Expand Down