changeset 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 c38c33a44171
children 33fd658d9d00
files libervia/backend/core/constants.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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: