18 from typing
import List, Optional, Any
22 from ..base_parameter
import BaseParameter
25 class BoolParameter(BaseParameter[bool]):
28 def types(self) -> List[type]:
31 def overrideValue(self, value: Optional[Any]) -> Optional[Any]:
36 if value.lower() ==
"true":
39 if value.lower() ==
"false":
42 raise ValueError(
"Could not recognise parsed value as boolean. Only accepted options are \"true\" and \"false\" (case insensitive)")
43 except ValueError
as e:
44 logging.getLogger(
"coretexpylib").warning(f
">> [Coretex] Failed to override boolean parameter \"{self.name}\". | {e}")