From bf38b9d2c39f628c1891b203a8a1ea3db84dd991 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Fri, 13 Jan 2023 13:46:16 +0100 Subject: [PATCH] Migrate to modern typing --- boxes/edges.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/boxes/edges.py b/boxes/edges.py index 8485a65..84a3229 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -13,13 +13,14 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations import abc import argparse import inspect import math import re -from typing import Optional, Dict, Any +from typing import Any from boxes import gears @@ -161,8 +162,8 @@ class Settings: the supported keys and default values. The values are available via attribute access. """ - absolute_params: Dict[str, Any] = {} # TODO find better typing. - relative_params: Dict[str, Any] = {} # TODO find better typing. + absolute_params: dict[str, Any] = {} # TODO find better typing. + relative_params: dict[str, Any] = {} # TODO find better typing. @classmethod def parserArguments(cls, parser, prefix=None, **defaults): @@ -291,7 +292,7 @@ class Settings: class BaseEdge: """Abstract base class for all Edges""" - char: Optional[str] = None + char: str | None = None description = "Abstract Edge Class" def __init__(self, boxes, settings) -> None: