Remove abstract method from classmethods (since it won't error if the abstract method isn't implemented until instantiation.

This commit is contained in:
Mike Auty
2016-01-10 16:30:37 +00:00
parent 3bf336df41
commit df4a4d5e8d
3 changed files with 2 additions and 4 deletions
@@ -33,7 +33,7 @@ def schema_name_split(path):
return path.split(SCHEMA_NAME_DIVIDER)
class ConfigurationSchemaNode(validity.ValidityRoutines):
class ConfigurationSchemaNode(validity.ValidityRoutines, metaclass = ABCMeta):
"""Class to distinguish configuration elements from everything else"""
def __init__(self, name, description = None, default = None, optional = False):
+1 -2
View File
@@ -87,13 +87,12 @@ class ObjectInterface(validity.ValidityRoutines, metaclass = ABCMeta):
object_info = ObjectInformation(layer_name = self.vol.layer_name,
offset = self.vol.offset))
class VolTemplateProxy(object, metaclass = ABCMeta):
class VolTemplateProxy(object):
"""A container for proxied methods that the ObjectTemplate of this object will call.
They are class methods rather than static methods, to allow for code reuse."""
@classmethod
@abstractmethod
def size(cls, template):
"""Returns the size of the template object"""
@@ -38,7 +38,6 @@ class PluginInterface(validity.ValidityRoutines, configuration_interface.Configu
return self._context
@classmethod
@abstractmethod
def get_schema(cls):
"""Returns a list of configuration schema items"""
return []