@@ -217,9 +217,9 @@ async def list_dir(self, prefix: str) -> AsyncIterator[str]:
217217 # a pseudo directory when there's a nested item and we're listing an
218218 # intermediate level.
219219 keys_unique = {
220- key .removeprefix (prefix + " /" ).split ("/" )[0 ]
220+ key .removeprefix (f" { prefix } /" ).split ("/" )[0 ]
221221 for key in self ._store_dict
222- if key .startswith (prefix + " /" ) and key != prefix
222+ if key .startswith (f" { prefix } /" ) and key != prefix
223223 }
224224
225225 for key in keys_unique :
@@ -822,7 +822,7 @@ async def delete(self, key: str) -> None:
822822
823823 async def list (self ) -> AsyncIterator [str ]:
824824 # docstring inherited
825- prefix = self .path + " /" if self .path else ""
825+ prefix = f" { self .path } /" if self .path else ""
826826 async for key in super ().list ():
827827 if key .startswith (prefix ):
828828 yield key .removeprefix (prefix )
@@ -832,7 +832,7 @@ async def list_prefix(self, prefix: str) -> AsyncIterator[str]:
832832 # Manual concatenation instead of _join_paths because we need "path/"
833833 # as the prefix when prefix is empty (to list all keys under self.path)
834834 full_prefix = f"{ self .path } /{ prefix } " if self .path else prefix
835- path_prefix = self .path + " /" if self .path else ""
835+ path_prefix = f" { self .path } /" if self .path else ""
836836 async for key in super ().list_prefix (full_prefix ):
837837 yield key .removeprefix (path_prefix )
838838
0 commit comments