Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/zarr/storage/_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@
self.compression = compression
self.allowZip64 = allowZip64

def with_read_only(self, read_only: bool = False) -> ZipStore:
# docstring inherited
store = type(self)(

Check warning on line 95 in src/zarr/storage/_zip.py

View check run for this annotation

Codecov / codecov/patch

src/zarr/storage/_zip.py#L95

Added line #L95 was not covered by tests
path=self.path,
mode='r',
read_only=read_only,
compression=self.compression,
allowZip64=self.allowZip64,
)
store._sync_open()
return store

Check warning on line 103 in src/zarr/storage/_zip.py

View check run for this annotation

Codecov / codecov/patch

src/zarr/storage/_zip.py#L102-L103

Added lines #L102 - L103 were not covered by tests

def _sync_open(self) -> None:
if self._is_open:
raise ValueError("store is already open")
Expand Down
Loading