From c0168ede3c11b055548fe46b772f43e8ac08698e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 21 Jan 2025 22:48:11 +0100 Subject: [PATCH] Fix typo --- src/pyobo/struct/reference.py | 2 +- src/pyobo/struct/struct_utils.py | 4 ++-- tests/test_api.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pyobo/struct/reference.py b/src/pyobo/struct/reference.py index f9c666f1..7fc9822e 100644 --- a/src/pyobo/struct/reference.py +++ b/src/pyobo/struct/reference.py @@ -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 diff --git a/src/pyobo/struct/struct_utils.py b/src/pyobo/struct/struct_utils.py index e4ed7dd9..29978805 100644 --- a/src/pyobo/struct/struct_utils.py +++ b/src/pyobo/struct/struct_utils.py @@ -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)], @@ -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)], diff --git a/tests/test_api.py b/tests/test_api.py index f1ec815b..8913eedc 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -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, ),