labapi.util.extract.to_bool#

labapi.util.extract.to_bool(s: str) bool[source]#

Convert a string representation to a boolean value.

Recognizes “true” (case-insensitive) as True and “false” (case-insensitive) as False.

Parameters:

s – The string to convert.

Returns:

The boolean representation of the string.

Raises:

ValueError – If the string cannot be converted to a boolean.