Fix more dumb mistakes, in annotations this time

styling
LEdoian 1 year ago
parent 8dad17c259
commit 113c540e19

@ -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):

Loading…
Cancel
Save