summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHernan Grecco <hgrecco@gmail.com>2023-05-01 19:59:19 -0300
committerHernan Grecco <hgrecco@gmail.com>2023-05-01 19:59:19 -0300
commit5643c32f7f2c886015df459f26b4d72adaee1207 (patch)
treef5fe98b6f8f5ffbc754bf16d429a3e42a246396f
parentbcd32b0f28bd8a8277a93259cdc5829797076112 (diff)
downloadpint-5643c32f7f2c886015df459f26b4d72adaee1207.tar.gz
Fix 3.9 support. TypeAlias is supported in 3.10+
-rw-r--r--pint/util.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pint/util.py b/pint/util.py
index 149945b..d75d1b5 100644
--- a/pint/util.py
+++ b/pint/util.py
@@ -24,7 +24,6 @@ import tokenize
from typing import (
TYPE_CHECKING,
ClassVar,
- TypeAlias,
Callable,
TypeVar,
Any,
@@ -48,8 +47,12 @@ logger.addHandler(NullHandler())
T = TypeVar("T")
TH = TypeVar("TH", bound=Hashable)
-ItMatrix: TypeAlias = Iterable[Iterable[PintScalar]]
-Matrix: TypeAlias = list[list[PintScalar]]
+
+# TODO: Change when Python 3.10 becomes minimal version.
+# ItMatrix: TypeAlias = Iterable[Iterable[PintScalar]]
+# Matrix: TypeAlias = list[list[PintScalar]]
+ItMatrix = Iterable[Iterable[PintScalar]]
+Matrix = list[list[PintScalar]]
def _noop(x: T) -> T: