Skip to content

Commit 822a445

Browse files
committed
accept "1"/"0" as "true"/"false" for !config
1 parent ceb0a19 commit 822a445

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def _format_example(self):
2424
def format(self, value: typing.Any):
2525
return repr(value)
2626

27-
SETTING_TRUE = ["true", "yes", "on", "y"]
28-
SETTING_FALSE = ["false", "no", "off", "n"]
27+
SETTING_TRUE = ["true", "yes", "on", "y", "1"]
28+
SETTING_FALSE = ["false", "no", "off", "n", "0"]
2929
class BoolSetting(Setting):
3030
example: typing.Optional[str] = "on"
3131
def parse(self, value: str) -> typing.Any:

0 commit comments

Comments
 (0)