hussein-awala commented on code in PR #34279:
URL: https://github.com/apache/airflow/pull/34279#discussion_r1322101970
##########
airflow/providers/sftp/operators/sftp.py:
##########
@@ -123,7 +123,7 @@ def execute(self, context: Any) -> str | list[str] | None:
f"!= {len(remote_filepath_array)} paths in remote_filepath"
)
- if not (self.operation.lower() == SFTPOperation.GET or
self.operation.lower() == SFTPOperation.PUT):
+ if self.operation.lower() not in (SFTPOperation.GET,
SFTPOperation.PUT):
Review Comment:
We discussed and tested a similar change in a different PR, and we found
that multiple equality/inequality with and/or is much faster than in/not in
tuple, but I think calling `.lower()` once instead of twice might change that.
--
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]