module documentation

Undocumented

Class ​Cyclic​Dependency​Error Undocumented
Function stable​_topological​_sort Undocumented
Function topological​_sort​_as​_sets Variation of Kahn's algorithm (1962) that returns sets.
def stable_topological_sort(nodes, dependency_graph):

Undocumented

def topological_sort_as_sets(dependency_graph):

Variation of Kahn's algorithm (1962) that returns sets.

Take a dependency graph as a dictionary of node => dependencies.

Yield sets of items in topological order, where the first set contains all nodes without dependencies, and each following set contains all nodes that may depend on the nodes only in the previously yielded sets.