Skip to content

Commit

Permalink
Fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Aug 11, 2024
1 parent 7391b8a commit 6a51673
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ontogpt/engines/knowledge_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class KnowledgeEngine(ABC):
mappers: Optional[List[BasicOntologyInterface]] = None
"""List of concept mappers, to assist in grounding to desired ID prefix"""

map_cache: Dict[str, str] = field(default_factory=dict)
map_cache: Dict[str, List[str]] = field(default_factory=dict)
"""Cache of mappings obtained using the specified mappers."""

labelers: Optional[List[BasicOntologyInterface]] = None
Expand Down Expand Up @@ -425,7 +425,7 @@ def map_identifier(self, input_id: str, cls: ClassDefinition) -> Iterator[str]:
for mapper in self.mappers:
if isinstance(mapper, MappingProviderInterface):
for mapping in mapper.sssom_mappings([input_id]):
self.map_cache[input_id].append(str(mapping.object_id))
(self.map_cache[input_id]).append(str(mapping.object_id))
yield str(mapping.object_id)
else:
raise ValueError(f"Unknown mapper type {mapper}")
Expand Down

0 comments on commit 6a51673

Please sign in to comment.