Skip to content

Commit

Permalink
reformat code with 'black'
Browse files Browse the repository at this point in the history
  • Loading branch information
berlincho committed May 4, 2021
1 parent d0ada62 commit 14f9c63
Show file tree
Hide file tree
Showing 11 changed files with 432 additions and 297 deletions.
8 changes: 4 additions & 4 deletions data/aifb/strip_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

g = rdf.Graph()

g.parse('./aifb_fixed_complete.n3', format='n3')
g.parse("./aifb_fixed_complete.n3", format="n3")

employs = rdf.term.URIRef("http://swrc.ontoware.org/ontology#employs")
affiliation = rdf.term.URIRef("http://swrc.ontoware.org/ontology#affiliation")
Expand All @@ -13,7 +13,7 @@
g.remove((None, employs, None))
g.remove((None, affiliation, None))

with gzip.open('aifb_stripped.nt.gz', 'wb') as output:
g.serialize(output, format='nt')
with gzip.open("aifb_stripped.nt.gz", "wb") as output:
g.serialize(output, format="nt")

g.close()
g.close()
10 changes: 5 additions & 5 deletions data/am/strip_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

g = rdf.Graph()

with gzip.open('am-combined.nt.gz', 'rb') as input:
g.parse(input, format='nt')
with gzip.open("am-combined.nt.gz", "rb") as input:
g.parse(input, format="nt")

rel = rdf.term.URIRef("http://purl.org/collections/nl/am/objectCategory")
g.remove((None, rel, None))

rel = rdf.term.URIRef("http://purl.org/collections/nl/am/material")
g.remove((None, rel, None))

with gzip.open('am_stripped.nt.gz', 'wb') as output:
g.serialize(output, format='nt')
with gzip.open("am_stripped.nt.gz", "wb") as output:
g.serialize(output, format="nt")

g.close()
g.close()
8 changes: 4 additions & 4 deletions data/bgs/strip_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

g = rdf.Graph()

g.parse('./completeDataset.nt', format='nt')
g.parse("./completeDataset.nt", format="nt")

lith = rdf.term.URIRef("http://data.bgs.ac.uk/ref/Lexicon/hasLithogenesis")

Expand All @@ -13,7 +13,7 @@

g.remove((None, lith, None))

with gzip.open('bgs_stripped.nt.gz', 'wb') as output:
g.serialize(output, format='nt')
with gzip.open("bgs_stripped.nt.gz", "wb") as output:
g.serialize(output, format="nt")

g.close()
g.close()
6 changes: 3 additions & 3 deletions data/mutag/strip_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

g = rdf.Graph()

g.parse('./carcinogenesis.owl', format='xml')
g.parse("./carcinogenesis.owl", format="xml")

is_mutagenic = rdf.term.URIRef("http://dl-learner.org/carcinogenesis#isMutagenic")

g.remove((None, is_mutagenic, None))

with gzip.open('mutag_stripped.nt.gz', 'wb') as output:
g.serialize(output, format='nt')
with gzip.open("mutag_stripped.nt.gz", "wb") as output:
g.serialize(output, format="nt")

g.close()
Loading

0 comments on commit 14f9c63

Please sign in to comment.