core (constants): type hints

This commit is contained in:
Goffi 2022-06-17 14:15:23 +02:00
commit 441ae82fcb

View file

@ -425,7 +425,7 @@ class Const(object):
)
@classmethod
def bool(cls, value):
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")