From 26aeb7c049eec1d20f61f724cfe52dab579de475 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Mon, 2 Sep 2024 17:11:02 -0700 Subject: [PATCH] syntaxerrors happen when parsing the AST --- src/numpydantic/interface/hdf5.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/numpydantic/interface/hdf5.py b/src/numpydantic/interface/hdf5.py index c64b022..ec32b0e 100644 --- a/src/numpydantic/interface/hdf5.py +++ b/src/numpydantic/interface/hdf5.py @@ -20,7 +20,7 @@ except ImportError: # pragma: no cover if sys.version_info.minor >= 10: from typing import TypeAlias else: - from typing_extensions import TypeAlias, Unpack + from typing_extensions import TypeAlias H5Arraylike: TypeAlias = Tuple[Union[Path, str], str] @@ -116,10 +116,8 @@ class H5Proxy: obj[key] = value else: if isinstance(key, tuple): - if sys.version_info.minor >= 10: - obj[*key, self.field] = value - else: - obj[Unpack[key], self.field] = value + key = (*key, self.field) + obj[key] = value else: obj[key, self.field] = value