You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/03 13:32:01 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #13449: Streamline & simplify __eq__ methods in models Dag and BaseOperator

mik-laj commented on a change in pull request #13449:
URL: https://github.com/apache/airflow/pull/13449#discussion_r551006565



##########
File path: airflow/models/dag.py
##########
@@ -361,8 +361,7 @@ def __repr__(self):
         return f"<DAG: {self.dag_id}>"
 
     def __eq__(self, other):
-        if type(self) == type(other) and self.dag_id == other.dag_id:
-
+        if type(self) == type(other):

Review comment:
       From what I can remember, it's optimization so we can check the most common case much faster.




----------------------------------------------------------------
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:
users@infra.apache.org