Skip to content

return type of fs.cat #707

Closed
Closed
@d-v-b

Description

@d-v-b

fsmap.getitems assumes that fs.cat returns a dict: see https://github.com/intake/filesystem_spec/blob/master/fsspec/mapping.py#L95. However, there is a branch in fs.cat that returns bytes, not a dict: see https://github.com/intake/filesystem_spec/blob/master/fsspec/spec.py#L728. Is this deliberate? Should fsmap.getitems convert the non-dict value to a dict, or should fs.cat always return a dict (as per its docstring)?

And maybe some type annotations would be helpful here.

(This came up while testing zarr against the latest fsspec, which causes a test failure because of this API issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions