Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jan 21, 2025
1 parent e114489 commit c0168ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pyobo/struct/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def validate_identifier(cls, values): # noqa
raise ValueError(f"non-standard identifier: {resource.prefix}:{values['identifier']}")
return values

def as_named_refernce(self) -> curies.NamedReference:
def as_named_reference(self) -> curies.NamedReference:
"""Get a named reference."""
if not self.name:
raise ValueError
Expand Down
4 changes: 2 additions & 2 deletions src/pyobo/struct/struct_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ def _get_prefixes_from_annotations(annotations: Iterable[Annotation]) -> set[str
def _get_stanza_name_synonym(stanza: Stanza) -> biosynonyms.LiteralMapping:
return biosynonyms.LiteralMapping(
text=stanza.reference.name,
reference=stanza.reference.as_named_refernce(),
reference=stanza.reference.as_named_reference(),
predicate=_v.has_label,
type=None,
provenance=[p for p in stanza.provenance if isinstance(p, curies.Reference)],
Expand All @@ -986,7 +986,7 @@ def _convert_synoynym(stanza: Stanza, synonym: Synonym) -> biosynonyms.LiteralMa
return biosynonyms.LiteralMapping(
text=synonym.name,
language=synonym.language,
reference=stanza.reference.as_named_refernce(),
reference=stanza.reference.as_named_reference(),
predicate=synonym.predicate,
type=synonym.type,
provenance=[p for p in synonym.provenance if isinstance(p, curies.Reference)],
Expand Down
4 changes: 2 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ def test_api(self) -> None:
expected = [
LiteralMapping(
text="ttt1",
reference=r1.as_named_refernce(),
reference=r1.as_named_reference(),
predicate=_v.has_related_synonym,
source=TEST_P1,
),
LiteralMapping(
text="test name",
reference=r1.as_named_refernce(),
reference=r1.as_named_reference(),
predicate=_v.has_label,
source=TEST_P1,
),
Expand Down

0 comments on commit c0168ed

Please sign in to comment.