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 pytomoatt/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.12'
__version__ = '0.2.13'
11 changes: 11 additions & 0 deletions pytomoatt/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,17 @@ def str2val(str_val):
except ValueError:
pass

if str_val.lower() in ['true', 'false', 'yes', 'no']:
return str_val.lower() in ['true', 'yes']

# return list of boolean
try:
items = [v.strip() for v in str_val.strip('[]').split(',')]
if all(v.lower() in ['true', 'false', 'yes', 'no'] for v in items):
return [v.lower() in ['true', 'yes'] for v in items]
except Exception:
pass

return str_val


Expand Down
Loading