Skip to content

Commit 65812c8

Browse files
committed
Add with_read_only to ObjectStore
1 parent 907585a commit 65812c8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/zarr/storage/_obstore.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ def __init__(self, store: _UpstreamObjectStore, *, read_only: bool = False) -> N
6969
super().__init__(read_only=read_only)
7070
self.store = store
7171

72+
def with_read_only(self, read_only: bool = False) -> ObjectStore:
73+
# docstring inherited
74+
return type(self)(
75+
store=self.store,
76+
read_only=read_only,
77+
)
78+
7279
def __str__(self) -> str:
7380
return f"object_store://{self.store}"
7481

0 commit comments

Comments
 (0)