core (constants): accept y and t as True values.

This commit is contained in:
Goffi 2023-10-18 15:33:34 +02:00
commit 40e7440de0

View file

@ -435,7 +435,7 @@ class Const(object):
def bool(cls, value: str) -> bool:
"""@return (bool): bool value for associated constant"""
assert isinstance(value, str)
return value.lower() in (cls.BOOL_TRUE, "1", "yes", "on")
return value.lower() in (cls.BOOL_TRUE, "1", "yes", "on", "y", "t")
@classmethod
def bool_const(cls, value: bool) -> str: