18 from typing
import Any, List, Optional, Union
20 from ..base_list_parameter
import BaseListParameter
21 from ....project
import ProjectType
24 class ListFloatParameter(BaseListParameter[List[Union[float, int]]]):
27 def listTypes(self) -> List[type]:
30 def parseValue(self, type_: ProjectType) -> Optional[Any]:
31 if self.value
is None:
34 values: List[float] = []
36 for element
in self.value:
37 if isinstance(element, int):
38 values.append(float(element))
40 values.append(element)