Be compatible with Python 3.9

older_libs
LEdoian 2 years ago
parent e6818a6c3f
commit 73db87f77b

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

Loading…
Cancel
Save