diff --git a/src/dsp_tools/xmllib/value_checkers.py b/src/dsp_tools/xmllib/value_checkers.py index 2108ea35f..802259a37 100644 --- a/src/dsp_tools/xmllib/value_checkers.py +++ b/src/dsp_tools/xmllib/value_checkers.py @@ -46,6 +46,10 @@ def is_bool_like(value: Any) -> bool: Checks if a value is a bool or can be converted into a bool. It is case-insensitive, meaning that the words can also be capitalised. + Accepted values: + - `false`, `0`, `0.0`, `no`, `non`, `nein` -> `False` + - `true`, `1`, `1.0`, `yes`, `oui`, `ja` -> `True` + Args: value: value to check diff --git a/src/dsp_tools/xmllib/value_converters.py b/src/dsp_tools/xmllib/value_converters.py index dc654bab0..190a70b72 100644 --- a/src/dsp_tools/xmllib/value_converters.py +++ b/src/dsp_tools/xmllib/value_converters.py @@ -34,8 +34,6 @@ def convert_to_bool(value: Any) -> bool: ``` ```python - # because this is not an accepted value, it is returned as a string - result = xmllib.convert_to_bool_string(None) # raises InputError ```