jorisvandenbossche commented on a change in pull request #8067:
URL: https://github.com/apache/arrow/pull/8067#discussion_r481089460
##########
File path: python/pyarrow/_fs.pyx
##########
@@ -405,16 +405,19 @@ cdef class FileSystem(_Weakrefable):
Parameters
----------
- paths_or_selector: FileSelector or list of path-likes
- Either a selector object or a list of path-like objects.
- The selector's base directory will not be part of the results, even
- if it exists. If it doesn't exist, use `allow_not_found`.
+ paths_or_selector: FileSelector, path-like or list of path-likes
+ Either a selector object, a path-like object or a list of
+ path-like objects. The selector's base directory will not be
+ part of the results, even if it exists. If it doesn't exist,
+ use `allow_not_found`.
Returns
-------
file_infos : list of FileInfo
Review comment:
Good point. I would personally keep it the way I did it in the PR
(single path -> single FileInfo, list of paths / selector -> list of FileInfo
objects), but in that case need to update this in the docstring.
Alternatively, can also always return a list, but IMO that defeats partly
the convenience of being able to pass a single path, as you would still need to
unpack the result (`fs.get_file_info(path)[0]`)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]