8282class Store (MutableMapping ):
8383 """Base class for stores implementation.
8484
85-
86- Provide a number of default method as well as other typing guaranties for mypy.
85+ Provide a number of default method as well as other typing guaranties for
86+ mypy.
8787
8888 Stores cannot be mutable mapping as they do have a couple of other
8989 requirements that would break Liskov substitution principle (stores only
@@ -96,7 +96,7 @@ class Store(MutableMapping):
9696
9797 Stores can be used as context manager to make sure they close on exit.
9898
99- .. added: 2.5 .0
99+ .. added: 2.9 .0
100100
101101 """
102102
@@ -135,7 +135,7 @@ def listdir(self, path: str = "") -> List[str]:
135135 def rename (self , src_path : str , dst_path : str ) -> None :
136136 if not self .is_erasable ():
137137 raise NotImplementedError (
138- f'{ type (self )} is not erasable, cannot call "rmdir "'
138+ f'{ type (self )} is not erasable, cannot call "rename "'
139139 ) # pragma: no cover
140140 _rename_from_keys (self , src_path , dst_path )
141141
@@ -154,9 +154,9 @@ def close(self) -> None:
154154 @staticmethod
155155 def _ensure_store (store ):
156156 """
157- We want to make sure internally that zarr storage are internally always
158- a class with a specific interface derived from Store, which is slightly
159- different than mutable mapping .
157+ We want to make sure internally that zarr stores are always a class
158+ with a specific interface derived from `` Store`` , which is slightly
159+ different than ``MutableMapping`` .
160160
161161 We'll do this conversion in a few places automatically
162162 """
@@ -182,8 +182,8 @@ def _ensure_store(store):
182182 return KVStore (store )
183183
184184 raise ValueError (
185- "Starting with Zarr X.y.z , stores must be subclasses of Store, if "
186- "you store expose the MutableMapping interface wrap them in "
185+ "Starting with Zarr 2.9.0 , stores must be subclasses of Store, if "
186+ "your store exposes the MutableMapping interface wrap it in "
187187 f"Zarr.storage.KVStore. Got { store } "
188188 )
189189
@@ -281,8 +281,8 @@ def listdir(store: Store, path: Path = None):
281281 else :
282282 # slow version, iterate through all keys
283283 warnings .warn (
284- "Store {store} has not `listdir` method. From zarr 2.5 you may want "
285- "to inherit from `Store`." . format ( store = store ) ,
284+ f "Store { store } has no `listdir` method. From zarr 2.9 onwards "
285+ "may want to inherit from `Store`." ,
286286 stacklevel = 2 ,
287287 )
288288 return _listdir_from_keys (store , path )
@@ -641,10 +641,10 @@ def _dict_store_keys(d: Dict, prefix="", cls=dict):
641641
642642class KVStore (Store ):
643643 """
644- This provide an default implementation of a store interface around
645- a mutable mapping, to avoid having to test stores for presence of methods
644+ This provides a default implementation of a store interface around
645+ a mutable mapping, to avoid having to test stores for presence of methods.
646646
647- This, for most method should just be a pass-through to the underlying KV
647+ This, for most methods should just be a pass-through to the underlying KV
648648 store which is likely to expose a MuttableMapping interface,
649649 """
650650
0 commit comments