From bcd32b0f28bd8a8277a93259cdc5829797076112 Mon Sep 17 00:00:00 2001 From: Hernan Grecco Date: Mon, 1 May 2023 19:43:20 -0300 Subject: [PATCH] Fix 3.9 support. Protocol do not support | --- pint/_typing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pint/_typing.py b/pint/_typing.py index 5547f85b5..65e355cf1 100644 --- a/pint/_typing.py +++ b/pint/_typing.py @@ -48,8 +48,9 @@ def __setitem__(self, key: Any, value: Any) -> None: ... -Magnitude = PintScalar | PintScalar - +# TODO: Change when Python 3.10 becomes minimal version. +# Magnitude = PintScalar | PintArray +Magnitude = Union[PintScalar, PintArray] UnitLike = Union[str, "UnitsContainer", "Unit"]