Closed smrohrer closed 10 months ago
Thank you for the quick and diligent review.
I am closing this pull request because of a misunderstanding on my part: I confused the intended behavior of luigi.target.FileSystem.listdir
with os.listdir
- the former is meant to be recursive, and the latter is not.
However, I think the inclusion of the input path in the Dropbox listdir
result does contradict the expected behavior of luigi.target.FileSystem.listdir
. This is a behavior of the Dropbox files_list_folder
function which is not described in the documentation.
If you think luigi.contrib.dropbox.DropboxClient.listdir
should filter out the input path, I'd be happy to open another pull request.
Description
Make the Dropbox
listdir
function accept an optional keyword argumentrecursive
, True by default to preserve the current behavior.Motivation and Context
Currently,
listdir
calls the Dropbox SDKfiles_list_folder
function withrecursive=True
hard-coded.recursive
should be optional, so we can replicate the functionality ofLocalFileSystem.listdir
which is not recursive.Have you tested this? If so, how?
listdir
tests to verify that by default, the list includes the nested fileDROPBOX_TEST_FILE_IN_DIR
tox -e py37-dropbox
locally