github-actions[bot] commented on code in PR #41388:
URL: https://github.com/apache/beam/pull/41388#discussion_r4582478750


##########
sdks/python/apache_beam/io/localfilesystem.py:
##########
@@ -121,6 +131,8 @@ def list_files(root):
     try:
       for f in list_files(dir_or_prefix):
         try:
+        if strip_dot_prefix and f.startswith('.' + os.sep):

Review Comment:
   **🔴 Critical**: `if strip_dot_prefix ...` is indented at the same level (8 
spaces) as `try:` on line 133, which raises an `IndentationError` on import. It 
needs to be indented to 10 spaces (and line 135 to 12 spaces).
   
   ```suggestion
             if strip_dot_prefix and f.startswith('.' + os.sep):
   ```



##########
sdks/python/apache_beam/io/localfilesystem.py:
##########
@@ -121,6 +131,8 @@ def list_files(root):
     try:
       for f in list_files(dir_or_prefix):
         try:
+        if strip_dot_prefix and f.startswith('.' + os.sep):
+          f = f[len('.' + os.sep):]

Review Comment:
   **🔴 Critical**: Along with indenting the `if` statement on line 134 to 10 
spaces, this body statement must be indented to 12 spaces so that `yield 
FileMetadata(...)` on line 136 remains outside the `if` block and executes when 
`strip_dot_prefix` is `False`.
   
   ```suggestion
               f = f[len('.' + os.sep):]
   ```



-- 
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]

Reply via email to