Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lib/graphlib.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from types import GenericAlias

__all__ = ["TopologicalSorter", "CycleError"]

_NODE_OUT = -1
Expand Down Expand Up @@ -244,3 +246,5 @@ def static_order(self):
node_group = self.get_ready()
yield from node_group
self.done(*node_group)

__class_getitem__ = classmethod(GenericAlias)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support :class:`graphlib.TopologicalSorter` type subscript