Skip to content

Commit aa1547e

Browse files
committed
fix: restore python 3.9 compatibility by removing | operator for union types
1 parent e0c7b77 commit aa1547e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/xarray_ome_ngff/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from __future__ import annotations
12
from pydantic import BaseModel
3+
from typing import Union
24

35
import pint
46

@@ -13,5 +15,5 @@ class CoordinateAttrs(BaseModel):
1315
units: str | None
1416

1517

16-
JSON = dict[str, "JSON"] | list["JSON"] | str | int | float | bool | None
18+
JSON = Union[dict[str, "JSON"], list["JSON"], str, int, float, bool, None]
1719
NGFF_VERSIONS = ("0.4",)

tests/test_docs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import annotations
12
import pytest
23
from pytest_examples import find_examples, CodeExample, EvalExample
34

tests/test_v04.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from dataclasses import dataclass
24
import zarr
35
import pytest

0 commit comments

Comments
 (0)