From af32db8152b608815cbd5f1b8167e6d94f3d072e Mon Sep 17 00:00:00 2001 From: Jeremy Magland Date: Wed, 17 Jul 2024 13:49:44 -0700 Subject: [PATCH 1/2] Add method to retrieve keys in LindiH5pyFile class --- lindi/LindiH5pyFile/LindiH5pyFile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lindi/LindiH5pyFile/LindiH5pyFile.py b/lindi/LindiH5pyFile/LindiH5pyFile.py index 5968a34..058e565 100644 --- a/lindi/LindiH5pyFile/LindiH5pyFile.py +++ b/lindi/LindiH5pyFile/LindiH5pyFile.py @@ -446,6 +446,9 @@ def get(self, name, default=None, getclass=False, getlink=False): raise Exception("Getting class is not allowed") return self._get_item(name, getlink=getlink, default=default) + def keys(self): # type: ignore + return self._the_group.keys() + def __iter__(self): return self._the_group.__iter__() From 24c5371c2100f4903ad4d2bf508e1361923e48eb Mon Sep 17 00:00:00 2001 From: Jeremy Magland Date: Wed, 17 Jul 2024 20:37:23 -0700 Subject: [PATCH 2/2] Implement items() for LindiH5pyFile --- lindi/LindiH5pyFile/LindiH5pyFile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lindi/LindiH5pyFile/LindiH5pyFile.py b/lindi/LindiH5pyFile/LindiH5pyFile.py index 058e565..93c85d2 100644 --- a/lindi/LindiH5pyFile/LindiH5pyFile.py +++ b/lindi/LindiH5pyFile/LindiH5pyFile.py @@ -449,6 +449,9 @@ def get(self, name, default=None, getclass=False, getlink=False): def keys(self): # type: ignore return self._the_group.keys() + def items(self): + return self._the_group.items() + def __iter__(self): return self._the_group.__iter__()