updated session.add_node to use better type hinting and force usage of classes directly, instead of indirectly through NodeTypes

This commit is contained in:
Blake Harnden 2020-05-20 22:14:03 -07:00
parent d5254e6a91
commit c07766e1eb
31 changed files with 315 additions and 276 deletions

View file

@ -123,7 +123,8 @@ def create_nodes(
funcs = []
for node_proto in node_protos:
_type, _id, options = add_node_data(node_proto)
args = (_type, _id, options)
_class = session.get_node_class(_type)
args = (_class, _id, options)
funcs.append((session.add_node, args, {}))
start = time.monotonic()
results, exceptions = utils.threadpool(funcs)