ashb commented on a change in pull request #20743:
URL: https://github.com/apache/airflow/pull/20743#discussion_r781159103



##########
File path: airflow/models/baseoperator.py
##########
@@ -1741,6 +1788,28 @@ def leaves(self) -> List["MappedOperator"]:
     def has_dag(self):
         return self.dag is not None
 
+    @property
+    def inherits_from_dummy_operator(self):
+        """Used to determine if an Operator is inherited from DummyOperator"""
+        # This looks like `isinstance(self, DummyOperator) would work, but 
this also
+        # needs to cope when `self` is a Serialized instance of a 
DummyOperator or one
+        # of its sub-classes (which don't inherit from anything but 
BaseOperator).
+        return getattr(self, '_is_dummy', False)

Review comment:
       Possibly can't be, I'll check.




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