Skip to content

Commit

Permalink
fix: restore python 3.9 compatibility by removing | operator for unio…
Browse files Browse the repository at this point in the history
…n types
  • Loading branch information
d-v-b committed Apr 23, 2024
1 parent e0c7b77 commit aa1547e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xarray_ome_ngff/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from __future__ import annotations
from pydantic import BaseModel
from typing import Union

import pint

Expand All @@ -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",)
1 change: 1 addition & 0 deletions tests/test_docs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import annotations
import pytest
from pytest_examples import find_examples, CodeExample, EvalExample

Expand Down
2 changes: 2 additions & 0 deletions tests/test_v04.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from dataclasses import dataclass
import zarr
import pytest
Expand Down

0 comments on commit aa1547e

Please sign in to comment.