Add _ALL superclass for Enumeration subclasses, for @extend purposes
This commit is contained in:
parent
32544c544a
commit
7f65f9ecb1
|
@ -163,9 +163,10 @@ class Enumeration(SchemaObject):
|
|||
cls.MODULE_PATH = module_path
|
||||
cls.NAME = name
|
||||
cls.VARIANTS = []
|
||||
cls._ALL = pretty_subclass(Definition, module_path_str(module_path + (name,)), '_ALL')
|
||||
for (n, d) in schema[0]:
|
||||
n = Symbol(n)
|
||||
c = pretty_subclass(Definition, module_path_str(module_path + (name,)), n.name)
|
||||
c = pretty_subclass(cls._ALL, module_path_str(module_path + (name,)), n.name)
|
||||
c._set_schema(rootns, module_path, name, d, n, cls)
|
||||
cls.VARIANTS.append((n, c))
|
||||
safesetattr(cls, n.name, c)
|
||||
|
|
|
@ -5,7 +5,7 @@ except ImportError:
|
|||
|
||||
setup(
|
||||
name="preserves",
|
||||
version="0.12.0",
|
||||
version="0.13.0",
|
||||
author="Tony Garnock-Jones",
|
||||
author_email="tonyg@leastfixedpoint.com",
|
||||
license="Apache Software License",
|
||||
|
|
Loading…
Reference in New Issue