fsspec / fsspec/filesystem_spec

DirFileSystem.ls() has `detail=True` as default

Open
#899 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

In the DirFileSystem implementation, the detail parameter is set to True by default (see here and here) whereas for other implementations like LocalFileSystem, it is set to False (see here). This makes it so that ls() will give a list of dictionaries instead of a list of strings. Can we set that parameter to False by default so it has the expected behavior?

Pinging @efiop and @lucmos since you two coded up the DirFileSystem I think. Thanks for putting that together!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in fsspec/implementations/dirfs.py around lines 200 and 209, then compare the corresponding ls() definition in fsspec/implementations/local.py around line 53. Verify that DirFileSystem.ls() uses the same default behavior and returns strings when detail is not provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.