mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2024-11-12 17:54:29 +00:00
python 3.9 compat
This commit is contained in:
parent
9c306db791
commit
2e5d0f4192
1 changed files with 8 additions and 2 deletions
|
@ -2,8 +2,9 @@
|
|||
Interfaces for HDF5 Datasets
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, NamedTuple, Tuple, TypeAlias, Union
|
||||
from typing import Any, NamedTuple, Tuple, Union
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
@ -15,7 +16,12 @@ try:
|
|||
except ImportError:
|
||||
h5py = None
|
||||
|
||||
H5Arraylike: TypeAlias = Tuple[Union[Path, str], str]
|
||||
if sys.version_info.minor >= 3.10:
|
||||
from typing import TypeAlias
|
||||
|
||||
H5Arraylike: TypeAlias = Tuple[Union[Path, str], str]
|
||||
else: # pragma: no cover
|
||||
H5Arraylike = Tuple[Union[Path, str], str]
|
||||
|
||||
|
||||
class H5ArrayPath(NamedTuple):
|
||||
|
|
Loading…
Reference in a new issue