Rework config system yet again, and start filling in some of the requirements.

This commit is contained in:
Mike Auty
2015-04-09 15:56:57 -05:00
parent 3d00956951
commit a85bcb9e58
8 changed files with 123 additions and 59 deletions
@@ -17,6 +17,10 @@ class ContextInterface(object, metaclass = ABCMeta):
# ## Symbol Space Functions
@abstractproperty
def config(self):
"""Returns the configuration object for this context"""
@abstractproperty
def symbol_space(self):
"""Returns the symbol_space for the context"""
@@ -46,6 +50,12 @@ class ContextInterface(object, metaclass = ABCMeta):
class ContextModifierInterface(object, metaclass = ABCMeta):
def __init__(self, namespace):
self.namespace = namespace
def config_get(self, context):
return context.config[self.namespace]
@classmethod
@abstractmethod
def requirements(cls):