adlfs icon indicating copy to clipboard operation
adlfs copied to clipboard

sync AzureBlobFileSystem.glob should pass **kwargs to async _glob

Open masda70 opened this issue 3 years ago • 1 comments

I want to pass detail=True to AzureBlobFileSystem.glob, but this is currently not possible. I think that simply passing **kwargs to the sync method below should suffice.

    def glob(self, path, **kwargs):
        return sync(self.loop, self._glob, path, **kwargs)

The current code:

https://github.com/fsspec/adlfs/blob/fbe43c601e7b162b7a2bf93f7f8b699c747b70e6/adlfs/spec.py#L670

masda70 avatar Feb 15 '22 17:02 masda70

could be easily fixed, not? I must add a patch every time I use glob(), with parameter detail=True... very annoying...

Here the patch:

from adlfs import AzureBlobFileSystem
def _patched_glob(self, path, **kwargs):
    from fsspec.asyn import sync
    return sync(self.loop, self._glob, path, **kwargs)
AzureBlobFileSystem.glob = _patched_glob

jeromerg avatar Aug 10 '23 15:08 jeromerg