josh-fell commented on code in PR #24451:
URL: https://github.com/apache/airflow/pull/24451#discussion_r898330005


##########
airflow/providers/sftp/sensors/sftp.py:
##########
@@ -71,6 +71,8 @@ def poke(self, context: 'Context') -> bool:
                 self.actual_file_to_check = file_from_pattern
             else:
                 return False
+        else:
+            self.actual_file_to_check = self.path

Review Comment:
   ❤️ the discussion here! I think they are all great suggestions, but they 
don't necessarily need to be part of this PR. Definitely feel free to fire over 
PRs and we can discuss more.
   
   >Perhaps the best approach is to initiate the variable inside the poke() 
method itself.
   +1 



##########
airflow/providers/sftp/sensors/sftp.py:
##########
@@ -71,6 +71,8 @@ def poke(self, context: 'Context') -> bool:
                 self.actual_file_to_check = file_from_pattern
             else:
                 return False
+        else:
+            self.actual_file_to_check = self.path

Review Comment:
   ❤️ the discussion here! I think they are all great suggestions, but they 
don't necessarily need to be part of this PR. Definitely feel free to fire over 
PRs and we can discuss more.
   
   >Perhaps the best approach is to initiate the variable inside the poke() 
method itself.
   
   +1 



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