Skip to content

Commit f7d6b6e

Browse files
committed
Fix style errors.
1 parent 2c40ecd commit f7d6b6e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/hermes/model/prov/ld_prov.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import uuid
22

33
from hermes.model.prov.ld_prov_node import ld_prov_node
4-
from hermes.model.types.pyld_util import jsonld, bundled_loader
4+
from hermes.model.types.pyld_util import bundled_loader
55

66
from hermes.model.types import ld_list, ld_context, iri_map as iri
77

src/hermes/model/types/ld_container.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,20 @@ def _to_expanded_json(self, key, value):
104104
if ':' in short_key:
105105
prefix, short_key = short_key.split(':', 1)
106106
ctx_value = self.ld_proc.get_context_value(self.active_ctx, prefix, "@id")
107-
active_ctx = self.ld_proc.process_context(self.active_ctx, [ctx_value], {"documentLoader": bundled_loader})
107+
active_ctx = self.ld_proc.process_context(self.active_ctx, [ctx_value],
108+
{"documentLoader": bundled_loader})
108109
else:
109110
active_ctx = self.active_ctx
110111
ld_type = self.ld_proc.get_context_value(active_ctx, short_key, "@type")
111112
if ld_type == "@id":
112113
ld_value = [{"@id": value}]
113114
ld_output = "expanded_json"
114115
else:
115-
ld_value, ld_output = self.ld_proc.apply_typemap(value, "expanded_json", "json", parent=self, key=key)
116+
ld_value, ld_output = self.ld_proc.apply_typemap(value, "expanded_json", "json",
117+
parent=self, key=key)
116118
if ld_output == "json":
117-
ld_value = self.ld_proc.expand(ld_value, {"expandContext": self.full_context, "documentLoader": bundled_loader})
119+
ld_value = self.ld_proc.expand(ld_value, {"expandContext": self.full_context,
120+
"documentLoader": bundled_loader})
118121
elif ld_output != "expanded_json":
119122
raise TypeError(f"Cannot convert {type(value)}")
120123

0 commit comments

Comments
 (0)