You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/14 21:03:55 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #24451: Update `actual_file_to_check` with rendered `path`

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


##########
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:
   Good catch! IMO it's probably not worth having `actual_file_to_check` be an instance attr since it's not used outside of the `poke()` method. WDYT? If you agree, it should be deleted from `__init__()` as well.



##########
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:
   Good catch! IMO it's probably not worth having `actual_file_to_check` be an instance attr since it's not used outside of the `poke()` method. WDYT? If you agree, it should be deleted from `__init__()` as well.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org