You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "eumiro (via GitHub)" <gi...@apache.org> on 2023/09/12 18:43:07 UTC
[GitHub] [airflow] eumiro commented on a diff in pull request #34279: Refactor: Think positively in providers
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org