yawning_titan.config.item_types.bool_item.BoolItem#
- class yawning_titan.config.item_types.bool_item.BoolItem(value, doc=None, alias=None, depends_on=None, properties=None)[source]#
Bases:
ConfigItem
The bool config item.
Methods
Set the value of the
ConfigItem
bypassing the validation.This is here to allow stringify methods to be call on both :class: ConfigItem and :class: ConfigGroup classes.
Return the ConfigItem as a dict.
Validate the item against its properties.
Attributes
The alias of the config item, i.e. its representation from the original config.
The items doc.
The items properties.
The instance of ConfigItemValidation that provides access to the item validation details.
- alias = None#
The alias of the config item, i.e. its representation from the original config.
- doc = None#
The items doc.
- properties = None#
The items properties.
- set_value(value)#
Set the value of the
ConfigItem
bypassing the validation.- Parameters:
value – The value to be set.
- stringify()#
This is here to allow stringify methods to be call on both :class: ConfigItem and :class: ConfigGroup classes.
- to_dict(as_key_val_pair=False, values_only=False, include_none=True)#
Return the ConfigItem as a dict.
- Parameters:
as_key_val_pair – If true, the dict is returned as a value in a key/value pair, the key being the class name.
- Returns:
The ConfigItem as a dict.
- validate()#
Validate the item against its properties.
If no properties exist, simply return a default passed
ConfigItemValidation
.- Returns:
An instance of
ConfigItemValidation
.
- validation = None#
The instance of ConfigItemValidation that provides access to the item validation details.
- value#
The items value.
- depends_on#
ConfigItem’s upon which this item depends. If these items are set so must this item be.
- Type:
A list of
- Type:
class