From 73db87f77b1d341fd3f5c9053692e4d7d14ed4b2 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 30 Sep 2022 06:47:39 +0200 Subject: [PATCH] Be compatible with Python 3.9 --- birdvisu/maps_new/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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