diff --git a/src/xarray_ome_ngff/core.py b/src/xarray_ome_ngff/core.py index b4f012c..4f8cf6f 100644 --- a/src/xarray_ome_ngff/core.py +++ b/src/xarray_ome_ngff/core.py @@ -1,4 +1,6 @@ +from __future__ import annotations from pydantic import BaseModel +from typing import Union import pint @@ -13,5 +15,5 @@ class CoordinateAttrs(BaseModel): units: str | None -JSON = dict[str, "JSON"] | list["JSON"] | str | int | float | bool | None +JSON = Union[dict[str, "JSON"], list["JSON"], str, int, float, bool, None] NGFF_VERSIONS = ("0.4",) diff --git a/tests/test_docs.py b/tests/test_docs.py index 6e49fbd..7ceb8c3 100644 --- a/tests/test_docs.py +++ b/tests/test_docs.py @@ -1,3 +1,4 @@ +from __future__ import annotations import pytest from pytest_examples import find_examples, CodeExample, EvalExample diff --git a/tests/test_v04.py b/tests/test_v04.py index b3c77d2..95307ad 100644 --- a/tests/test_v04.py +++ b/tests/test_v04.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from dataclasses import dataclass import zarr import pytest