convert_to_list
- qf_lib.common.utils.miscellaneous.to_list_conversion.convert_to_list(value: Union[SingleValueT, Sequence[SingleValueT]], type_of_single_value: Union[Type[SingleValueT], Sequence[Type[SingleValueT]]]) Tuple[Sequence[SingleValueT], bool] [source]
Converts a given value to list if necessary and returns information if the conversion was necessary.
- Parameters:
value – value or sequence of values to be converted
type_of_single_value – allowed type (or types) of a single value of the element which should be converted to list
- Returns:
a list of values and a bool value indicating whether the conversion was necessary (True) or not (False)
- Return type:
List, bool