diff --git a/birdvisu/maps_new/__init__.py b/birdvisu/maps_new/__init__.py index 602b4be..0f512f1 100644 --- a/birdvisu/maps_new/__init__.py +++ b/birdvisu/maps_new/__init__.py @@ -1,6 +1,6 @@ from dataclasses import dataclass, field from abc import ABC, abstractmethod -from typing import Sequence, Callable +from typing import Sequence, Callable, Union # The topologies provided by TopologyProviders are independent and do not have # common routers, networks and links. We therefore join them on identifiers, @@ -16,7 +16,7 @@ class Router: # some separate part of code. But everything else takes data from a # CombinedTopology object, so we would still need a way of resolving this, # and adding a separate object would complicate the code even more. - details: tuple[str,list] | None = None + details: Union[tuple[str,list],None] = None # source objects for this Router in case of combined topology. Key is some # source identifier # FIXME: This allows for different identifiers in sources, which should be @@ -37,7 +37,7 @@ class Router: class Network: ident: str links: list['Link'] - details: tuple[str,list] | None = None + details: Union[tuple[str,list],None] = None sources: dict[str, 'Network'] = field(default_factory=dict) @property