From 4fffc8b9da8ef7e100057422154504e6ca2f8369 Mon Sep 17 00:00:00 2001 From: Paul van Schayck Date: Thu, 14 Nov 2024 14:55:00 +0100 Subject: [PATCH] Support Python 3.8 --- src/covjson_pydantic/ndarray.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/covjson_pydantic/ndarray.py b/src/covjson_pydantic/ndarray.py index 1a88838..9f7eb66 100644 --- a/src/covjson_pydantic/ndarray.py +++ b/src/covjson_pydantic/ndarray.py @@ -4,6 +4,7 @@ from typing import List from typing import Literal from typing import Optional +from typing import Union from pydantic import model_validator from typing_extensions import Generic @@ -23,7 +24,7 @@ class DataType(str, Enum): class NdArray(CovJsonBaseModel, Generic[NdArrayTypeT], extra="allow"): type: Literal["NdArray"] = "NdArray" - dataType: DataType | None = None # noqa: N815 + dataType: Union[DataType, None] = None # noqa: N815 axisNames: Optional[List[str]] = None # noqa: N815 shape: Optional[List[int]] = None values: List[Optional[NdArrayTypeT]] = []