1010from zarr .core .dtype .common import DTypeConfig_V2 , DTypeSpec_V2
1111from zarr .core .dtype .npy .structured import StructuredJSON_V2
1212from zarr .core .dtype .npy .time import TimeConfig
13- from zarr .core .type_check import TypeCheckResult , _type_name , check_type , ensure_type , guard_type
13+ from zarr .core .type_check import (
14+ TypeCheckResult ,
15+ _get_typeddict_metadata ,
16+ _resolve_type ,
17+ _type_name ,
18+ check_type ,
19+ check_typeddict ,
20+ ensure_type ,
21+ guard_type ,
22+ )
1423
1524
1625# --- Sample TypedDicts for testing ---
@@ -532,8 +541,6 @@ def test_typevar_self_reference_edge_case() -> None:
532541 triggering the self-reference detection in _resolve_type_impl.
533542 This covers the rarely hit line 114.
534543 """
535- from zarr .core .type_check import _resolve_type
536-
537544 T = TypeVar ("T" )
538545 # Create a type_map where T maps to itself
539546 type_map = {T : T }
@@ -550,7 +557,6 @@ def test_non_typeddict_fallback_error() -> None:
550557 Tests the fallback error case when _get_typeddict_metadata returns None,
551558 meaning the type is not actually a TypedDict.
552559 """
553- from zarr .core .type_check import check_typeddict
554560
555561 # Pass a regular class that's not a TypedDict
556562 class NotATypedDict :
@@ -567,7 +573,6 @@ def test_get_typeddict_metadata_fallback() -> None:
567573 Tests the fallback case where _get_typeddict_metadata cannot extract
568574 valid metadata from the provided type.
569575 """
570- from zarr .core .type_check import _get_typeddict_metadata
571576
572577 # Test with a type that's not a TypedDict at all
573578 result = _get_typeddict_metadata (int )
@@ -591,7 +596,6 @@ def test_complex_forwardref_scenarios(typ_str: str, typ_expected: type) -> None:
591596 # in internal type resolution, not in the main check_type path.
592597
593598 # Instead, let's test a scenario that would use ForwardRef internally
594- from zarr .core .type_check import _resolve_type
595599
596600 # Test string that would need evaluation in type context
597601 result = _resolve_type (typ_str , globalns = globals ())
0 commit comments