comparison sat/core/constants.py @ 3794:a58715ffa445

core (constants): type hints
author Goffi <goffi@goffi.org>
date Fri, 17 Jun 2022 14:15:23 +0200
parents 5d108ce026d7
children 8289ac1b34f4
comparison
equal deleted inserted replaced
3793:b5c9021020df 3794:a58715ffa445
423 cls.LOG_OPT_LOGGER, 423 cls.LOG_OPT_LOGGER,
424 cls.LOG_OPT_OUTPUT, 424 cls.LOG_OPT_OUTPUT,
425 ) 425 )
426 426
427 @classmethod 427 @classmethod
428 def bool(cls, value): 428 def bool(cls, value: str) -> bool:
429 """@return (bool): bool value for associated constant""" 429 """@return (bool): bool value for associated constant"""
430 assert isinstance(value, str) 430 assert isinstance(value, str)
431 return value.lower() in (cls.BOOL_TRUE, "1", "yes", "on") 431 return value.lower() in (cls.BOOL_TRUE, "1", "yes", "on")
432 432
433 @classmethod 433 @classmethod