Mercurial > libervia-backend
diff libervia/backend/core/constants.py @ 4132:8e5333f1b430
core (constants): accept `y` and `t` as `True` values.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 18 Oct 2023 15:33:34 +0200 |
parents | 10b6ad569157 |
children | a8a0fa678ce2 |
line wrap: on
line diff
--- a/libervia/backend/core/constants.py Wed Oct 18 15:33:24 2023 +0200 +++ b/libervia/backend/core/constants.py Wed Oct 18 15:33:34 2023 +0200 @@ -435,7 +435,7 @@ 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: