-
-
Notifications
You must be signed in to change notification settings - Fork 366
Allow mode casting for Stores
#2249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
efeb440
501f151
b390d7d
2ef51f7
3ee37f1
3fd8c46
926c71a
7f173d2
f2fc9c2
18ace67
10d49c6
4c48a51
92f6fec
109afd8
f200830
d180720
3a02ee6
a4f83fe
a4dc888
bb29be4
b302a0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ | |
| from pathlib import Path | ||
| from typing import TYPE_CHECKING, Any, Literal | ||
|
|
||
| from typing_extensions import Self | ||
|
|
||
| from zarr.abc.store import Store | ||
| from zarr.core.buffer import Buffer, BufferPrototype | ||
|
|
||
|
|
@@ -115,6 +117,11 @@ async def empty(self) -> bool: | |
| else: | ||
| return True | ||
|
|
||
| def with_mode(self, mode: ZipStoreAccessModeLiteral) -> Self: # type: ignore[override] | ||
| return type(self)( | ||
|
||
| path=self.path, mode=mode, compression=self.compression, allowZip64=self.allowZip64 | ||
| ) | ||
|
|
||
| def __str__(self) -> str: | ||
| return f"zip://{self.path}" | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.