Skip to content

Commit e4e1664

Browse files
committed
Revert the explicit parametrisation of the TreeStore for bench to normal
1 parent 4c45c95 commit e4e1664

1 file changed

Lines changed: 10 additions & 22 deletions

File tree

src/blosc2/tree_store.py

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class TreeStore(DictStore):
8787
and always start with '/'. If user passes a key that doesn't start with '/',
8888
it will be automatically added.
8989
90+
It supports the same arguments as :class:`blosc2.DictStore`.
91+
9092
Parameters
9193
----------
9294
localpath : str
@@ -143,32 +145,18 @@ class TreeStore(DictStore):
143145
Please report any issues you may find.
144146
"""
145147

146-
def __init__(
147-
self,
148-
localpath: str | None = None,
149-
mode: str = "a",
150-
tmpdir: str | None = None,
151-
cparams: dict | None = None,
152-
dparams: dict | None = None,
153-
storage: blosc2.Storage | None = None,
154-
threshold: int | None = None,
155-
*,
156-
_from_parent_store=None,
157-
):
158-
"""Initialize TreeStore with subtree support."""
148+
# For some reason, we had to revert the explicit parametrisation of the
149+
# constructor to make benchmarks wrok fine again.
150+
def __init__(self, *args, _from_parent_store=None, **kwargs):
151+
"""Initialize TreeStore with subtree support.
152+
153+
It supports the same arguments as :class:`blosc2.DictStore`.
154+
"""
159155
if _from_parent_store is not None:
160156
# This is a subtree view, copy state from parent
161157
self.__dict__.update(_from_parent_store.__dict__)
162158
else:
163-
super().__init__(
164-
localpath=localpath,
165-
mode=mode,
166-
tmpdir=tmpdir,
167-
cparams=cparams,
168-
dparams=dparams,
169-
storage=storage,
170-
threshold=threshold,
171-
)
159+
super().__init__(*args, **kwargs)
172160
self.subtree_path = "" # Empty string means full tree
173161

174162
def _is_vlmeta_key(self, key: str) -> bool:

0 commit comments

Comments
 (0)