Skip to content

Commit a30af88

Browse files
committed
fix(zarr/v3): correct zarr format + remove unused method
1 parent f2635e3 commit a30af88

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/zarr/v3/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def to_bytes(self) -> Dict[str, bytes]:
4646
return {ZARR_JSON: json.dumps(self.to_dict()).encode()}
4747
else:
4848
return {
49-
ZGROUP_JSON: str(self.zarr_format).encode(),
49+
ZGROUP_JSON: json.dumps({"zarr_format": 2}).encode(),
5050
ZATTRS_JSON: json.dumps(self.attributes).encode(),
5151
}
5252

src/zarr/v3/store/core.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ def __init__(self, store: Store, path: Optional[str] = None):
2424
self.store = store
2525
self.path = path or ""
2626

27-
@classmethod
28-
def from_path(cls, pth: Path) -> StorePath:
29-
# NOT SOLVED: This is instantiating an ABC + there is no from_path method
30-
return cls(Store.from_path(pth)) # type: ignore
31-
3227
async def get(
3328
self, byte_range: Optional[Tuple[int, Optional[int]]] = None
3429
) -> Optional[BytesLike]:
@@ -71,8 +66,6 @@ def make_store_path(store_like: StoreLike) -> StorePath:
7166
return store_like
7267
elif isinstance(store_like, Store):
7368
return StorePath(store_like)
74-
# elif isinstance(store_like, Path):
75-
# return StorePath(Store.from_path(store_like))
7669
elif isinstance(store_like, str):
7770
try:
7871
from upath import UPath

0 commit comments

Comments
 (0)