From 5b1250fb86c06d60a6c7eb64d5c546cb540f43fe Mon Sep 17 00:00:00 2001 From: Davis Bennett Date: Tue, 19 Mar 2024 17:53:31 +0100 Subject: [PATCH] chore: conditional type imports --- tests/test_v2.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_v2.py b/tests/test_v2.py index 36acc1b..89ed784 100644 --- a/tests/test_v2.py +++ b/tests/test_v2.py @@ -1,8 +1,13 @@ +from __future__ import annotations +from typing import TYPE_CHECKING, Any, Union from pydantic import ValidationError import pytest import zarr from zarr.errors import ContainsGroupError, ContainsArrayError -from typing import Any, Literal, Union, Optional + +if TYPE_CHECKING: + from typing import Literal, Optional + import numcodecs from numcodecs.abc import Codec from pydantic_zarr.v2 import (