From 822a44570cb0cbfd24f5b5585d8997c298fd3474 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 6 Feb 2020 17:58:29 +0000 Subject: [PATCH] accept "1"/"0" as "true"/"false" for !config --- src/utils/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/settings.py b/src/utils/settings.py index 8040c2e8..97fe885b 100644 --- a/src/utils/settings.py +++ b/src/utils/settings.py @@ -24,8 +24,8 @@ class Setting(object): def format(self, value: typing.Any): return repr(value) -SETTING_TRUE = ["true", "yes", "on", "y"] -SETTING_FALSE = ["false", "no", "off", "n"] +SETTING_TRUE = ["true", "yes", "on", "y", "1"] +SETTING_FALSE = ["false", "no", "off", "n", "0"] class BoolSetting(Setting): example: typing.Optional[str] = "on" def parse(self, value: str) -> typing.Any: