From d4a9493e498b7bf118990b13b11d98d5db0d1955 Mon Sep 17 00:00:00 2001 From: Maximos Nikiforakis Date: Thu, 15 Feb 2024 08:18:41 +0200 Subject: [PATCH] fixup! WIP descriptors --- src/property_utils/units/descriptors.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/property_utils/units/descriptors.py b/src/property_utils/units/descriptors.py index 43142ee..9f19beb 100644 --- a/src/property_utils/units/descriptors.py +++ b/src/property_utils/units/descriptors.py @@ -9,7 +9,13 @@ """ from enum import Enum, EnumMeta -from typing import List, Union, Protocol, TypeAlias, Optional, TypeVar +from typing import List, Union, Protocol, Optional, TypeVar + +try: + from typing import TypeAlias # Python >= 3.10 +except ImportError: + from typing_extensions import TypeAlias # Python < 3.10 + from dataclasses import dataclass, field from property_utils.exceptions.exceptions import (