Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return type of fs.cat #707

Closed
d-v-b opened this issue Jul 14, 2021 · 1 comment · Fixed by #710
Closed

return type of fs.cat #707

d-v-b opened this issue Jul 14, 2021 · 1 comment · Fixed by #710

Comments

@d-v-b
Copy link
Contributor

d-v-b commented Jul 14, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant