def after1(json): Operation.global_operations = [ Operation.from_dict(op) for op in json["operations"] ] Theorem.theorems = [ Theorem.from_dict(th) for th in json["theorems"] ] self.label_done.setText("done") after()
def from_dict(dic): vars = [Operation(k, 0, dic["var_print_schemes"][k], k, Operation.VARIABLE) for k in dic["var_print_schemes"]] spec_ops = [Operation.from_dict(k) for k in dic["spec_ops"]] return Theorem(Formula.from_list(dic["formula"], Operation.get_globals() + vars + spec_ops), dic["id"], dic["folder"], operations=spec_ops)
def after1(json): Operation.global_operations = [Operation.from_dict(op) for op in json["operations"]] Theorem.theorems = [Theorem.from_dict(th) for th in json["theorems"]] self.label_done.setText("done") after()