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

Missing else in dataset.py #687

Open
hannahbnelson opened this issue Sep 10, 2024 · 0 comments
Open

Missing else in dataset.py #687

hannahbnelson opened this issue Sep 10, 2024 · 0 comments

Comments

@hannahbnelson
Copy link

Inside dataset.py, in flatten(), there is the following block:

        if fs.isdir(entry):
            res.extend(fs.ls(entry))
        elif fs.isfile(entry):
            res.append(entry)

This is missing an else statement so if fs.isdir() and fs.isfile() are both false, there is no clear error message and this function doesn't behave correctly so it's very difficult to debug.

@hannahbnelson hannahbnelson changed the title Missing else option in dataset.py Missing else in dataset.py Sep 10, 2024
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

No branches or pull requests

1 participant