Skip to content

Commit 94933b3

Browse files
committed
fixup
1 parent be2b3cd commit 94933b3

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

src/zarr/core/group.py

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ class AsyncGroup:
122122
metadata: GroupMetadata
123123
store_path: StorePath
124124

125-
@property
126-
def store(self) -> Store:
127-
return self.store_path.store
128-
129125
@classmethod
130126
async def from_store(
131127
cls,
@@ -313,6 +309,21 @@ def attrs(self) -> dict[str, Any]:
313309
def info(self) -> None:
314310
raise NotImplementedError
315311

312+
@property
313+
def store(self) -> Store:
314+
return self.store_path.store
315+
316+
@property
317+
def read_only(self) -> bool:
318+
# Backwards compatibility for 2.x
319+
return self.store_path.store.mode.readonly
320+
321+
@property
322+
def synchronizer(self) -> None:
323+
# Backwards compatibility for 2.x
324+
# Not implemented in 3.x yet.
325+
return None
326+
316327
async def create_group(
317328
self,
318329
path: str,
@@ -537,22 +548,6 @@ async def move(self, source: str, dest: str) -> None:
537548
class Group(SyncMixin):
538549
_async_group: AsyncGroup
539550

540-
@property
541-
def store(self) -> Store:
542-
# Backwards compatibility for 2.x
543-
return self._async_group.store
544-
545-
@property
546-
def read_only(self) -> bool:
547-
# Backwards compatibility for 2.x
548-
return self._async_group.store.mode.readonly
549-
550-
@property
551-
def synchronizer(self) -> None:
552-
# Backwards compatibility for 2.x
553-
# Not implemented in 3.x yet.
554-
return None
555-
556551
@classmethod
557552
def from_store(
558553
cls,
@@ -644,6 +639,22 @@ def attrs(self) -> Attributes:
644639
def info(self) -> None:
645640
raise NotImplementedError
646641

642+
@property
643+
def store(self) -> Store:
644+
# Backwards compatibility for 2.x
645+
return self._async_group.store
646+
647+
@property
648+
def read_only(self) -> bool:
649+
# Backwards compatibility for 2.x
650+
return self._async_group.read_only
651+
652+
@property
653+
def synchronizer(self) -> None:
654+
# Backwards compatibility for 2.x
655+
# Not implemented in 3.x yet.
656+
return self._async_group.synchronizer
657+
647658
def update_attributes(self, new_attributes: dict[str, Any]) -> Group:
648659
self._sync(self._async_group.update_attributes(new_attributes))
649660
return self

0 commit comments

Comments
 (0)