mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Try to solve the 'Bool.of_string: expected true or false but got True'
This commit is contained in:
parent
d71be0bb7c
commit
74c9e03e2a
@ -70,9 +70,9 @@ def is_bool(str_):
|
|||||||
Take a string, if is a bool return the conversion into
|
Take a string, if is a bool return the conversion into
|
||||||
fortran and ocaml.
|
fortran and ocaml.
|
||||||
"""
|
"""
|
||||||
if "true" in str_.lower():
|
if "true" in str_.stirp().lower():
|
||||||
return Type(None, "true", ".True.")
|
return Type(None, "true", ".True.")
|
||||||
elif "false" in str_.lower():
|
elif "false" in str_.stirp().lower():
|
||||||
return Type(None, "false", ".False")
|
return Type(None, "false", ".False")
|
||||||
else:
|
else:
|
||||||
raise TypeError
|
raise TypeError
|
||||||
|
Loading…
Reference in New Issue
Block a user