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):
56
56
if not path :
57
57
return self .path
58
58
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 ()}
59
61
return [self ._join (_path ) for _path in path ]
60
62
61
63
def _relpath (self , path ):
Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ def test_pipe(dirfs):
162
162
dirfs .fs .pipe .assert_called_once_with (f"{ PATH } /file" , * ARGS , ** KWARGS )
163
163
164
164
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
+
165
170
@pytest .mark .asyncio
166
171
async def test_async_pipe_file (adirfs ):
167
172
await adirfs ._pipe_file ("file" , * ARGS , ** KWARGS )
You can’t perform that action at this time.
0 commit comments