@@ -128,7 +128,7 @@ def normalize_store_arg(store: Any, clobber=False, storage_options=None, mode="w
128
128
return store
129
129
130
130
131
- def rmdir (store : StoreLike , path : Path = None ):
131
+ def rmdir (store : StoreLike , path : str = None ):
132
132
"""Remove all items under the given path. If `store` provides a `rmdir` method,
133
133
this will be called, otherwise will fall back to implementation via the
134
134
`Store` interface."""
@@ -155,7 +155,7 @@ def rename(store: BaseStore, src_path: Path, dst_path: Path):
155
155
_rename_from_keys (store , src_path , dst_path )
156
156
157
157
158
- def listdir (store : BaseStore , path : Path = None ):
158
+ def listdir (store : BaseStore , path : str = None ):
159
159
"""Obtain a directory listing for the given path. If `store` provides a `listdir`
160
160
method, this will be called, otherwise will fall back to implementation via the
161
161
`MutableMapping` interface."""
@@ -694,7 +694,7 @@ def __iter__(self):
694
694
def __len__ (self ) -> int :
695
695
return sum (1 for _ in self .keys ())
696
696
697
- def listdir (self , path : Path = None ) -> List [str ]:
697
+ def listdir (self , path : str = None ) -> List [str ]:
698
698
path = normalize_storage_path (path )
699
699
if path :
700
700
try :
@@ -718,7 +718,7 @@ def rename(self, src_path: Path, dst_path: Path):
718
718
719
719
dst_parent [dst_key ] = src_parent .pop (src_key )
720
720
721
- def rmdir (self , path : Path = None ):
721
+ def rmdir (self , path : str = None ):
722
722
path = normalize_storage_path (path )
723
723
if path :
724
724
try :
@@ -2157,7 +2157,7 @@ def _keys(self):
2157
2157
self ._keys_cache = list (self ._store .keys ())
2158
2158
return self ._keys_cache
2159
2159
2160
- def listdir (self , path : Path = None ):
2160
+ def listdir (self , path : str = None ) -> List [ str ] :
2161
2161
with self ._mutex :
2162
2162
try :
2163
2163
return self ._listdir_cache [path ]
@@ -2682,5 +2682,5 @@ def __setitem__(self, key, value):
2682
2682
def getsize (self , path ):
2683
2683
return getsize (self .meta_store , path )
2684
2684
2685
- def listdir (self , path ):
2685
+ def listdir (self , path = None ):
2686
2686
return listdir (self .meta_store , path )
0 commit comments