diff --git a/birdvisu/annotations/__init__.py b/birdvisu/annotations/__init__.py index 205cb00..88ceb6a 100644 --- a/birdvisu/annotations/__init__.py +++ b/birdvisu/annotations/__init__.py @@ -22,7 +22,7 @@ indirections to iterating over all annotation of a particular vertex/edge. We believe that the latter is less common operation, so this seems like a good approach.""" -from .topo_v3 import TopologyV3, VertexID, Edge +from ..topo_v3 import TopologyV3, VertexID, Edge from collections import defaultdict from collections.abc import Hashable from dataclasses import dataclass @@ -40,7 +40,7 @@ class AnnotatedTopology: self.edge_annotators: dict[Edge, set['AnnotatorID']] = defaultdict(lambda: set()) self.global_annotators: set['AnnotatorID'] = set() - def run_annotator(self, ann_id) -> Annotator | None: + def run_annotator(self, ann_id) -> 'Annotator | None': # I hate python. """This creates and runs an :class:Annotator Note that we do only support running an Annotator based on its ID, @@ -88,7 +88,7 @@ class Annotation: # Use of Any here means "something reasonable and stringifiable". We do not # know whether this can be specified reasonably. for_vertex: dict[VertexID, Any] - for_edge: dict[VertexID, Any] + for_edge: dict[Edge, Any] for_topology: Any | None class Annotator(ABC):