zhongjiajie commented on a change in pull request #7343: [AIRFLOW-6719]
Introduce pyupgrade to enforce latest syntax
URL: https://github.com/apache/airflow/pull/7343#discussion_r385092821
##########
File path: airflow/providers/amazon/aws/operators/s3_delete_objects.py
##########
@@ -74,4 +74,16 @@ def __init__(
def execute(self, context):
s3_hook = S3Hook(aws_conn_id=self.aws_conn_id, verify=self.verify)
+<<<<<<< HEAD
s3_hook.delete_objects(bucket=self.bucket, keys=self.keys)
+=======
+
+ response = s3_hook.delete_objects(bucket=self.bucket, keys=self.keys)
+
+ deleted_keys = [x['Key'] for x in response.get("Deleted", [])]
+ self.log.info("Deleted: %s", deleted_keys)
+
+ if "Errors" in response:
+ errors_keys = [x['Key'] for x in response.get("Errors", [])]
+ raise AirflowException(f"Errors when deleting: {errors_keys}")
+>>>>>>> b18ba328b... [AIRFLOW-6719] Introduce pyupgrade to enforce latest
syntax
Review comment:
It fail as you said, not that easy, but this is rebase mistake
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services