uranusjr commented on code in PR #71213:
URL: https://github.com/apache/airflow/pull/71213#discussion_r3732309639


##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -806,6 +809,23 @@ def tasks(self, val):
     def task_ids(self) -> list[str]:
         return list(self.task_dict)
 
+    @property
+    def is_mixed_language_dag(self) -> bool:
+        """
+        Whether this Dag pairs Python with a Lang-SDK runtime, i.e. holds any 
``@task.stub`` task.
+
+        Always derived from the Dag's tasks, never author-set, so that a 
Lang-SDK Dag processor can
+        tell a Dag that merely backs stub tasks from one authored natively in 
that language.
+        """
+        return any(task.operator_name == STUB_OPERATOR_NAME for task in 
self.task_dict.values())

Review Comment:
   Operator name should not be used for logical conditions. Add a flag instead.



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