validations
Validations for the arguments.
- class xrfeitoria.utils.validations.Validator[source]
- classmethod validate_argument_type(value, typelist: List[Type]) None[source]
Validate the type of an argument.
- Parameters:
value (Any) – The value to be validated.
typelist (List[Type]) – The list of types to be validated.
- Raises:
TypeError – If the type of the argument is not in the typelist.
- classmethod validate_vector(value, length: int)[source]
Validate the type and length of a vector.
- Parameters:
value (Any) – The value to be validated.
length (int) – The length of the vector.
- Raises:
TypeError – If the type of the argument is not a vector, or the length of the vector is not equal to the given length.