uranusjr commented on a change in pull request #21731:
URL: https://github.com/apache/airflow/pull/21731#discussion_r816310915



##########
File path: airflow/callbacks/callback_requests.py
##########
@@ -64,6 +73,34 @@ def __init__(
         self.simple_task_instance = simple_task_instance
         self.is_failure_callback = is_failure_callback
 
+    def __eq__(self, other):
+        if isinstance(other, TaskCallbackRequest):
+            return (
+                self.simple_task_instance.__dict__ == 
other.simple_task_instance.__dict__
+                and self.full_filepath == other.full_filepath
+                and self.is_failure_callback == other.is_failure_callback
+                and self.msg == other.msg
+            )
+        return False

Review comment:
       This should not be needed if we implement `CallbackRequest`’s `__eq__` 
“correctly”:
   
   ```python
   def __eq__(self, other):
       if not isinstance(other, self.__class__):
           return NotImplemented
       return self.__dict__ == other.__dict__
   ```




-- 
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]


Reply via email to