예제 #1
0
파일: prop.py 프로젝트: roguenet/microtome
 def __init__(self, name, annotations, value_classes):
     self.name = name
     if annotations is not None:
         self._annotations = {item[0]: PropAnnotation(item[1]) for item in annotations.items()}
     else:
         self._annotations = PropSpec._EMPTY_DICT
     self.value_type = TypeInfo.from_classes(*value_classes) if value_classes else None
예제 #2
0
파일: tome.py 프로젝트: roguenet/microtome
 def __init__(self, name, page_class):
     LibraryItemBase.__init__(self, name)
     self._type_info = TypeInfo.from_classes(Tome, page_class)
     self._pages = {}