Allow the optional setting of requirements to be changed (for sub-plugins).

This commit is contained in:
Mike Auty
2018-03-25 18:16:34 +01:00
parent 154732126d
commit eaadd53951
2 changed files with 6 additions and 1 deletions
@@ -274,6 +274,11 @@ class RequirementInterface(validity.ValidityRoutines, metaclass = ABCMeta):
"""Whether the Requirement is optional or not"""
return self._optional
@optional.setter
def optional(self, value) -> None:
"""Sets the optional value for a requirement"""
self._optional = bool(value)
def config_value(self,
context: interfaces.context.ContextInterface,
config_path: str,