yawning_titan.config.item_types.bool_item.BoolProperties#

class yawning_titan.config.item_types.bool_item.BoolProperties(_allowed_types=None, allow_null=None, default=None)[source]#

Bases: ItemTypeProperties

The BoolProperties class holds the properties relevant for defining and validating a bool value.

Methods

to_dict

An abstract method that returns the properties as a dict.

validate

Perform the base validation checks common to all ConfigItem elements.

Attributes

allow_null

True if the config value can be left empty, otherwise False.

default

The default value

allow_null = None#

True if the config value can be left empty, otherwise False.

default = None#

The default value

to_dict()#

An abstract method that returns the properties as a dict.

Returns:

A dict.

validate(val)#

Perform the base validation checks common to all ConfigItem elements.

These checks include: - Check that the value is not null if :attribute: allow_null is False - Check that the type of the value is in :attribute: allowed_types