File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ def _join(self, path):
5656 if not path :
5757 return self .path
5858 return self .fs .sep .join ((self .path , self ._strip_protocol (path )))
59+ if isinstance (path , dict ):
60+ return {self ._join (_path ): value for _path , value in path .items ()}
5961 return [self ._join (_path ) for _path in path ]
6062
6163 def _relpath (self , path ):
Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ def test_pipe(dirfs):
162162 dirfs .fs .pipe .assert_called_once_with (f"{ PATH } /file" , * ARGS , ** KWARGS )
163163
164164
165+ def test_pipe_dict (dirfs ):
166+ dirfs .pipe ({"file" : b"foo" }, * ARGS , ** KWARGS )
167+ dirfs .fs .pipe .assert_called_once_with ({f"{ PATH } /file" : b"foo" }, * ARGS , ** KWARGS )
168+
169+
165170@pytest .mark .asyncio
166171async def test_async_pipe_file (adirfs ):
167172 await adirfs ._pipe_file ("file" , * ARGS , ** KWARGS )
You can’t perform that action at this time.
0 commit comments