Skip to content

Commit ebe8b67

Browse files
committed
Merge branch 'refactor/store-mode' of github.com:jhamman/zarr-python into refactor/store-mode
2 parents a0c86c5 + af30833 commit ebe8b67

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/zarr/core/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class VindexInvalidSelectionError(IndexError):
6868
_msg = (
6969
"unsupported selection type for vectorized indexing; only "
7070
"coordinate selection (tuple of integer arrays) and mask selection "
71-
"(single Boolean array) are supported; got {0!r}"
71+
"(single Boolean array) are supported; got {!r}"
7272
)
7373

7474

src/zarr/errors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ def __init__(self, *args: Any) -> None:
99

1010

1111
class ContainsGroupError(_BaseZarrError):
12-
_msg = "A group exists in store {0!r} at path {1!r}."
12+
_msg = "A group exists in store {!r} at path {!r}."
1313

1414

1515
class ContainsArrayError(_BaseZarrError):
16-
_msg = "An array exists in store {0!r} at path {1!r}."
16+
_msg = "An array exists in store {!r} at path {!r}."
1717

1818

1919
class ContainsArrayAndGroupError(_BaseZarrError):
2020
_msg = (
2121
"Array and group metadata documents (.zarray and .zgroup) were both found in store "
22-
"{0!r} at path {1!r}."
22+
"{!r} at path {!r}. "
2323
"Only one of these files may be present in a given directory / prefix. "
2424
"Remove the .zarray file, or the .zgroup file, or both."
2525
)

src/zarr/storage/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def __str__(self) -> str:
206206
return _dereference_path(str(self.store), self.path)
207207

208208
def __repr__(self) -> str:
209-
return f"StorePath({self.store.__class__.__name__}, {str(self)!r})"
209+
return f"StorePath({self.store.__class__.__name__}, '{self}')"
210210

211211
def __eq__(self, other: object) -> bool:
212212
"""

src/zarr/storage/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __str__(self) -> str:
116116
return f"file://{self.root.as_posix()}"
117117

118118
def __repr__(self) -> str:
119-
return f"LocalStore({str(self)!r})"
119+
return f"LocalStore('{self}')"
120120

121121
def __eq__(self, other: object) -> bool:
122122
return isinstance(other, type(self)) and self.root == other.root

src/zarr/storage/memory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __str__(self) -> str:
6262
return f"memory://{id(self._store_dict)}"
6363

6464
def __repr__(self) -> str:
65-
return f"MemoryStore({str(self)!r})"
65+
return f"MemoryStore('{self}')"
6666

6767
def __eq__(self, other: object) -> bool:
6868
return (
@@ -203,7 +203,7 @@ def __str__(self) -> str:
203203
return f"gpumemory://{id(self._store_dict)}"
204204

205205
def __repr__(self) -> str:
206-
return f"GpuMemoryStore({str(self)!r})"
206+
return f"GpuMemoryStore('{self}')"
207207

208208
@classmethod
209209
def from_dict(cls, store_dict: MutableMapping[str, Buffer]) -> Self:

src/zarr/storage/zip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __str__(self) -> str:
129129
return f"zip://{self.path}"
130130

131131
def __repr__(self) -> str:
132-
return f"ZipStore({str(self)!r})"
132+
return f"ZipStore('{self}')"
133133

134134
def __eq__(self, other: object) -> bool:
135135
return isinstance(other, type(self)) and self.path == other.path

src/zarr/testing/strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def arrays(
138138
expected_attrs = {} if attributes is None else attributes
139139

140140
array_path = path + ("/" if not path.endswith("/") else "") + name
141-
root = zarr.open_group(store, mode="w")
141+
root = zarr.open_group(store, mode="w", zarr_format=zarr_format)
142142

143143
a = root.create_array(
144144
array_path,

0 commit comments

Comments
 (0)