Commit 7d8329e5 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

fixed parse_bool

parent 7d01d42b
......@@ -12,10 +12,10 @@ APPS_DIR = os.path.join(ROOT_DIR, 'allgo')
#FIXME: we should rather do these type conversions in config/ because
# this is very error prone
def parse_bool(value):
if value.lower() in (1, "true"):
def parse_bool(value: str):
if value.lower() in ("1", "true"):
return True
if value.lower() in (0, "false"):
if value.lower() in ("0", "false", ""):
return False
raise ValueError("invalid value %r (expected 'true' or 'false')" % value)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment