Abacn commented on code in PR #24317:
URL: https://github.com/apache/beam/pull/24317#discussion_r1029898753
##########
sdks/python/apache_beam/io/aws/s3io.py:
##########
@@ -112,10 +115,28 @@ def list_prefix(self, path, with_metadata=False):
If ``with_metadata`` is False: dict of file name -> size; if
``with_metadata`` is True: dict of file name -> tuple(size, timestamp).
"""
+ file_info = {}
+ for file_metadata in self.list_files(path, with_metadata):
+ file_info[file_metadata[0]] = file_metadata[1]
+
+ return file_info
+
+ def list_files(self, path, with_metadata=False):
Review Comment:
Use a different name because the return type (generator of files) is
different from list_prefix (dict of files). And now the latter is a wrapper for
the former.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]