dryparse.types
Module containing special option types.
- class OptionType(value: str)
Base class for all option value types.
You can create custom types by subclassing this class.
Attributes
- takes_argument: bool
Whether the option value is specified as an argument to the option or is derived from the presence of the option itself.
- value: Any
The option argument converted to an arbitrary type.
- class Counter(value: str)
A counter that increments each time an option is specified.
- class Bool(value: str)
A bool type that understands
"true"
,"True"
,"false"
,"False"
and empty string.