Skip to content

Commit

Permalink
Merge pull request #99 from linkml/prefix-check-rdflib6-compat
Browse files Browse the repository at this point in the history
Make prefix check rdflib compatible Replaces #96 For context see linkml/linkml#537
  • Loading branch information
cmungall authored Dec 22, 2021
2 parents bf1b655 + 2b32df9 commit c8d41c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linkml_runtime/utils/namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def uri_for(self, uri_or_curie: Any) -> URIRef:

def uri_or_curie_for(self, prefix: Union[str, URIRef], suffix: str) -> str:
""" Return a CURIE for prefix/suffix in possible, else a URI """
if isinstance(prefix, URIRef) or ':/' in prefix:
if isinstance(prefix, URIRef) or ':/' in str(prefix):
prefix_as_uri = str(prefix)
for k, v in self.items():
if not k.startswith('@') and prefix_as_uri == str(v):
Expand Down

0 comments on commit c8d41c6

Please sign in to comment.