Skip to content

Commit

Permalink
Remove type erroring
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jul 28, 2023
1 parent 0cbf5ab commit 830124e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/curies/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,6 @@ def from_jsonld(cls, data: LocationOr[Dict[str, Any]]) -> "Converter":
prefix_map[key] = value
elif isinstance(value, dict) and value.get("@prefix") == True:
prefix_map[key] = value["@id"]
else:
raise TypeError
return cls.from_prefix_map(prefix_map)

@classmethod
Expand Down
5 changes: 4 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def test_jsonld(self):
"@prefix": True,
"@id": "http://purl.obolibrary.org/CHEBI_",
},
}
"nope": {
"nope": "nope",
},
},
}
converter = Converter.from_jsonld(context)
self.assertIn("hello", converter.prefix_map)
Expand Down

0 comments on commit 830124e

Please sign in to comment.