mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2024-11-09 16:24:28 +00:00
syntaxerrors happen when parsing the AST
This commit is contained in:
parent
99d68f0d00
commit
26aeb7c049
1 changed files with 3 additions and 5 deletions
|
@ -20,7 +20,7 @@ except ImportError: # pragma: no cover
|
||||||
if sys.version_info.minor >= 10:
|
if sys.version_info.minor >= 10:
|
||||||
from typing import TypeAlias
|
from typing import TypeAlias
|
||||||
else:
|
else:
|
||||||
from typing_extensions import TypeAlias, Unpack
|
from typing_extensions import TypeAlias
|
||||||
|
|
||||||
H5Arraylike: TypeAlias = Tuple[Union[Path, str], str]
|
H5Arraylike: TypeAlias = Tuple[Union[Path, str], str]
|
||||||
|
|
||||||
|
@ -116,10 +116,8 @@ class H5Proxy:
|
||||||
obj[key] = value
|
obj[key] = value
|
||||||
else:
|
else:
|
||||||
if isinstance(key, tuple):
|
if isinstance(key, tuple):
|
||||||
if sys.version_info.minor >= 10:
|
key = (*key, self.field)
|
||||||
obj[*key, self.field] = value
|
obj[key] = value
|
||||||
else:
|
|
||||||
obj[Unpack[key], self.field] = value
|
|
||||||
else:
|
else:
|
||||||
obj[key, self.field] = value
|
obj[key, self.field] = value
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue