ashb commented on code in PR #22741:
URL: https://github.com/apache/airflow/pull/22741#discussion_r842601547


##########
airflow/utils/task_group.py:
##########
@@ -401,6 +401,69 @@ def expand(self, arg: Iterable) -> "MappedTaskGroup":
             self.task_group._remove(self)
         return MappedTaskGroup(group_id=self._group_id, dag=self.dag, 
mapped_arg=arg)
 
+    def topological_sort(self, _include_subdag_tasks: bool = False):
+        """
+        Sorts children in topographical order, such that a task comes after 
any of its
+        upstream dependencies.
+
+        Heavily inspired by:
+        
http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/

Review Comment:
   Can't find what was on that URL, but I've worked out that this is an 
implementation of Kahn's Topo Sort algorithm.



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