Remove unnecessary components after all the refactoring.

This commit is contained in:
Mike Auty
2016-07-30 00:37:24 +01:00
parent f8c3019165
commit 32b0b073ce
@@ -100,47 +100,3 @@ class ConfigurableInterface(validity.ValidityRoutines):
def validate(cls, context, config_path):
return all([requirement.validate(context, config_path) for requirement in cls.get_requirements() if
not requirement.optional])
class RequirementTreeNode(validity.ValidityRoutines):
def __init__(self, requirement = None):
validity.ValidityRoutines.__init__(self)
if requirement is not None:
self._check_type(requirement, RequirementInterface)
self.requirement = requirement
def traverse(self, visitor, config_path = None, short_circuit = False):
"""Applies the function visitor to each node
The visitor callable should have a signature of visitor(node, config_path) => Bool
When short_circuit is True:
RequirementChoices will stop as soon as one traversal responds with True
RequirementLists will stop as soon as one traversal responds with False
When short_circuit is False the return value of children are always ignored
Returns the result from visitor applied to the node
"""
class HierachicalVisitor(validity.ValidityRoutines):
def branch_enter(self, node, config_path):
"""Called on entering a branch of a tree
Returns a boolean indicating whether to process any children of this node
"""
return True
def branch_leave(self, node, config_path):
"""Called on leaving a branch of a tree
Returns a boolean indicating whether to process any further siblings of this node
"""
return True
def __call__(self, node, config_path):
"""Designed to be called on each LEAF node in a tree
Returns a boolean indiciating whether to process any further siblings of this node
"""
return True