yawning_titan.config.core.ConfigValidationBase#
- class yawning_titan.config.core.ConfigValidationBase(fail_reasons=None, fail_exceptions=None)[source]#
 Bases:
ConfigBaseThe base validation methods for a config element.
Methods
Add a validation fail_reason, exception pair to their respective lists.
Get the attributes of the class that are either :class: ConfigGroup or
ConfigItem.Get all attributes of the class that are not :class: ConfigGroup or :class: ConfigItem.
Represent the class as a string.
Attributes
~yawning_titan.config.core.ConfigGroup children of the group.
~yawning_titan.config.core.ConfigItem children of the group.
fail_reasons or :attribute: fail_exceptions.
- add_validation(fail_reason, exception)[source]#
 Add a validation fail_reason, exception pair to their respective lists.
Additionally check that no such error already exists.
- Parameters:
 fail_reason – A string message to describe a particular error.
exception – A wrapped Exception object that can be used to raise an error for the fail_reason.
- abstract property passed#
 fail_reasons or :attribute: fail_exceptions.
- Returns:
 A bool.
- Type:
 Returns True if there are no
- Type:
 attribute
- property config_groups#
 ~yawning_titan.config.core.ConfigGroup children of the group.
- Type:
 Property to represent the
- Type:
 class
- property config_items#
 ~yawning_titan.config.core.ConfigItem children of the group.
- Type:
 Property to represent the
- Type:
 class
- get_config_elements(types=None)#
 Get the attributes of the class that are either :class: ConfigGroup or
ConfigItem.- Parameters:
 _type – An optional type for a specific type of config element.
- Returns:
 A dictionary of names to config elements.
- get_non_config_elements()#
 Get all attributes of the class that are not :class: ConfigGroup or :class: ConfigItem.
- Returns:
 A dictionary of names to attributes.