check_larger_than#

check_larger_than(min_value: Number, value: Number, name: str, allow_none: bool = False) Number[source][source]#

Check if value is larger than or equal to min_value.

Parameters:
min_valueint, float

Minimum allowed value.

valueint, float

Value to check.

namestr

Name of the parameter to be shown in the error message.

allow_nonebool, optional (default=False)

Whether to allow None values.

Returns:
valueint, float

Input value.

Raises:
ValueError

If value is not None and smaller than min_value.