|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, min=None, max=None, clamp=False) |
| def | convert (self, value, param, ctx) |
| def | __repr__ (self) |
Public Member Functions inherited from ParamType | |
| def | __call__ (self, value, param=None, ctx=None) |
| def | get_metavar (self, param) |
| def | get_missing_message (self, param) |
| def | split_envvar_value (self, rv) |
| def | fail (self, message, param=None, ctx=None) |
Data Fields | |
| min | |
| max | |
| clamp | |
Static Public Attributes | |
| string | name = "float range" |
Static Public Attributes inherited from FloatParamType | |
| string | name = "float" |
Static Public Attributes inherited from ParamType | |
| bool | is_composite = False |
| name = None | |
| envvar_list_splitter = None | |
A parameter that works similar to :data:`click.FLOAT` but restricts the value to fit into a range. The default behavior is to fail if the value falls outside the range, but it can also be silently clamped between the two edges. See :ref:`ranges` for an example.
| def __init__ | ( | self, | |
min = None, |
|||
max = None, |
|||
clamp = False |
|||
| ) |
| def __repr__ | ( | self | ) |
Reimplemented from FloatParamType.
| def convert | ( | self, | |
| value, | |||
| param, | |||
| ctx | |||
| ) |
Converts the value. This is not invoked for values that are `None` (the missing value).
Reimplemented from FloatParamType.
| clamp |
| max |
| min |
|
static |