MCPcopy
hub / github.com/programthink/zhao / init

Method init

bin/make.py:66–78  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

64
65 @classmethod
66 def init(cls) :
67 for family_id in os.listdir(u'../data/family/') :
68 family_id = family_id.replace(u'.yaml', u'')
69 yaml_file = u'../data/family/%s.yaml' % (family_id,)
70 if family_id not in Node.all :
71 _raise_err(u'Invalid family name: "%s"!', family_id)
72
73 yaml = _load_yaml(yaml_file)
74 for lst in yaml[u'relations'] :
75 relation = Relation(lst)
76 Relation.all[relation.name] = relation
77 Relation.keys.append(relation.name)
78 print(u'Relation number: %d' % len(Relation.all))
79
80
81 def __init__(self, lst) :

Callers

nothing calls this directly

Calls 3

_raise_errFunction · 0.85
_load_yamlFunction · 0.85
RelationClass · 0.85

Tested by

no test coverage detected