Skip to content

Commit

Permalink
resource id as str instead of str
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssarah committed Oct 25, 2023
1 parent c1e1ad7 commit f58e63f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def recursive_resolve(self, context: Union[Dict, List, str]) -> Dict:
document.update(context)
return document

def _load_shape(self, resource_id: URIRef):
def _load_shape(self, resource_id: str):
if resource_id not in self._imported:
try:
shape = self.context_store.retrieve(resource_id, version=None, cross_bucket=False)
Expand All @@ -163,12 +163,12 @@ def _load_and_get_type_shape(self, iri: URIRef) -> ShapeWrapper:
try:
return self._shapes_graph.lookup_shape_from_node(iri)
except KeyError:
shape_resource_id = self.shape_to_source[iri]
shape_resource_id: str = self.shape_to_source[iri]
self._load_shape_and_reload_shapes_graph(shape_resource_id)
return self._shapes_graph.lookup_shape_from_node(iri)

def _load_shape_and_reload_shapes_graph(self, iri: URIRef):
self._load_shape(iri)
def _load_shape_and_reload_shapes_graph(self, resource_id: str):
self._load_shape(resource_id)
# reloads the shapes graph
self._shapes_graph = ShapesGraphWrapper(self._graph)

0 comments on commit f58e63f

Please sign in to comment.