eumiro commented on code in PR #34279:
URL: https://github.com/apache/airflow/pull/34279#discussion_r1323427088
##########
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:
I also believe it is faster for a developer to read `self.operation.lower()`
once than to jump visually between the two occurrences and hoping to find a
slight difference between the two.
--
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]