mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-01 00:53:23 +08:00
15
stdlib/3.9/graphlib.pyi
Normal file
15
stdlib/3.9/graphlib.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from typing import Generic, Iterable, Mapping, Optional, Tuple, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class TopologicalSorter(Generic[_T]):
|
||||
def __init__(self, graph: Optional[Mapping[_T, Iterable[_T]]] = ...) -> None: ...
|
||||
def add(self, node: _T, *predecessors: _T) -> None: ...
|
||||
def prepare(self) -> None: ...
|
||||
def is_active(self) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def done(self, *nodes: _T) -> None: ...
|
||||
def get_ready(self) -> Tuple[_T, ...]: ...
|
||||
def static_order(self) -> Iterable[_T]: ...
|
||||
|
||||
class CycleError(ValueError): ...
|
||||
Reference in New Issue
Block a user