Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(self, closure_bool = False, axiomatic_bool = False, datatype_axiom_bool = False):
app = flask.current_app # set app to be current flask app
new_graph = rdflib.ConjunctiveGraph() # create new empty graph to run reasoner
new_graph += app.db # add current graph to new graph
owlrl.DeductiveClosure(owlrl.OWLRL_Extension, rdfs_closure = closure_bool, axiomatic_triples = axiomatic_bool, datatype_axioms = datatype_axiom_bool).expand(new_graph) # run reasoner using specified options
new_graph -= app.db # remove content from initial graph from the new graph
# output graph (for testing purposes mostly)
new_graph.serialize("inferred_graph.ttl", format="turtle")