@ -144,7 +144,7 @@ class AnnotatedTopology:
# TODO: maybe class to handle sets of annotators?
def annotate_topology(topology,
annotators: Sequence[Callable[[AnnotatedTopology], AnnotatedTopology]],
initial_annotation: AnnotatedTopology = None,
initial_annotation: AnnotatedTopology | None = None,
) -> AnnotatedTopology:
"""Runs all the annotators and assigns all the tags.
@ -16,7 +16,7 @@ class OspfDataTopologyProvider(TopologyProvider):
# feel trustworthy (I don't really understand them, but I think they
# depend on designated routers and interface numbers, changes of which
# should not cause us to think that is a different network)
self.network_renames = {}
self.network_renames : dict[str,str] = {}
# We only care for areas:
# TODO: Should we support global visualisation configuration?
for directive, details in parsed:
@ -46,7 +46,7 @@ class BirdSocketConnection:
self.socket.send(binreq)
return self._parse_response()
def _parse_response(self):
def _parse_response(self) -> BirdResponse:
# We even read from the socket here in order to have the whole protocol
# described at one place. Therefore other parts of the code do not need
# to know anything about the protocol (maybe apart from the meaning of