diplomat.processing.type_casters.RangedInteger
- class diplomat.processing.type_casters.RangedInteger(*args, **kwds)[source]
Bases:
ConvertibleTypeCasterRepresents an integer with a restricted range of values it can take on.
- __init__(minimum: float, maximum: float)[source]
Create a ranged integer type.
- Parameters
minimum – The minimum allowed value of this integer, a float, inclusive.
maximum – The maximum allowed value of this type, a float, inclusive.
Methods
__init__(minimum, maximum)Create a ranged integer type.
Convert this type to a CLI-Friendly format for display on the command line as a metavar.
Abstract method: Convert this typecaster instance to a regular type hint.