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

download_folder can return False which is not documented #315

Closed
RunDevelopment opened this issue Feb 2, 2024 · 1 comment
Closed

download_folder can return False which is not documented #315

RunDevelopment opened this issue Feb 2, 2024 · 1 comment
Labels
bug for issue

Comments

@RunDevelopment
Copy link

Provide environment information

Python 3.8.2
gdown: main

What OS are you using?

Windows 10

Describe the Bug

The return type of download_folder is documented as:

filenames: list of str
        List of files downloaded, or None if failed.

Ignoring that the stated type (list of str) and the documentation disagree, the documented type (list[str] | None) is not correct. The function can also return False via this code path.

Btw. the variable return_code isn't actually a return code, but a bool that describes whether gdrive_file is None.

Expected Behavior

Do what the docs say.

To Reproduce

No response

@RunDevelopment RunDevelopment added the bug for issue label Feb 2, 2024
@wkentaro
Copy link
Owner

wkentaro commented Feb 3, 2024

@RunDevelopment Yeah, I've just noticed this bug while working on this PR: https://github.com/wkentaro/gdown/pull/317/files#diff-d7515ef115e0aa06e22e4982677823eea6feba7594ba740388219f6206880484R277.

It's merged to main, and will be fixed in the next release.

@wkentaro wkentaro closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for issue
Projects
None yet
Development

No branches or pull requests

2 participants