We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edb39f5 commit f6596ffCopy full SHA for f6596ff
1 file changed
pytools/graph.py
@@ -281,6 +281,8 @@ def __lt__(self, other: _HeapEntry[NodeT]) -> bool:
281
282
def compute_topological_order(
283
graph: GraphT[NodeT],
284
+ # should not use CanLt[object] because many types can't compare against
285
+ # everything under the sun
286
key: Callable[[NodeT], optype.CanLt[Any]] | None = None,
287
) -> list[NodeT]:
288
"""Compute a topological order of nodes in a directed graph.
0 commit comments