module documentation

Topological sorting algorithms.

Function find_cycles Undocumented
Function sort sort the given list of items by dependency.
Function sort_as_subsets Undocumented
Function _gen_edges Undocumented
Type Variable _T Undocumented
def find_cycles(tuples: Iterable[Tuple[_T, _T]], allitems: Iterable[_T]) -> Set[_T]: (source)

Undocumented

def sort(tuples: Collection[Tuple[_T, _T]], allitems: Collection[_T], deterministic_order: bool = True) -> Iterator[_T]: (source)

sort the given list of items by dependency. 'tuples' is a list of tuples representing a partial ordering. deterministic_order is no longer used, the order is now always deterministic given the order of "allitems". the flag is there for backwards compatibility with Alembic.

def sort_as_subsets(tuples: Collection[Tuple[_T, _T]], allitems: Collection[_T]) -> Iterator[Sequence[_T]]: (source)

Undocumented

def _gen_edges(edges: DefaultDict[_T, Set[_T]]) -> Set[Tuple[_T, _T]]: (source)

Undocumented

Undocumented

Value
TypeVar('_T',
        bound=Any)