from typing import Any, Optional

class DOT:
    HEAD: Any = ...
    ATTR: str = ...
    NODE: str = ...
    EDGE: str = ...
    ATTRSEP: str = ...
    DIRS: Any = ...
    TAIL: str = ...

class CycleError(Exception): ...

class DependencyGraph:
    formatter: Any = ...
    adjacent: Any = ...
    def __init__(self, it: Optional[Any] = ..., formatter: Optional[Any] = ...) -> None: ...
    def add_arc(self, obj: Any) -> None: ...
    def add_edge(self, A: Any, B: Any) -> None: ...
    def connect(self, graph: Any) -> None: ...
    def topsort(self): ...
    def valency_of(self, obj: Any): ...
    def update(self, it: Any) -> None: ...
    def edges(self): ...
    def to_dot(self, fh: Any, formatter: Optional[Any] = ...) -> None: ...
    def format(self, obj: Any): ...
    def __iter__(self) -> Any: ...
    def __getitem__(self, node: Any): ...
    def __len__(self): ...
    def __contains__(self, obj: Any): ...
    items: Any = ...
    iteritems: Any = ...
    def repr_node(self, obj: Any, level: int = ..., fmt: str = ...): ...

class GraphFormatter:
    scheme: Any = ...
    edge_scheme: Any = ...
    node_scheme: Any = ...
    term_scheme: Any = ...
    graph_scheme: Any = ...
    id: Any = ...
    root: Any = ...
    type: Any = ...
    direction: Any = ...
    IN: Any = ...
    INp: Any = ...
    def __init__(self, root: Optional[Any] = ..., type: Optional[Any] = ..., id: Optional[Any] = ..., indent: int = ..., inw: Any = ..., **scheme: Any) -> None: ...
    def attr(self, name: Any, value: Any): ...
    def attrs(self, d: Any, scheme: Optional[Any] = ...): ...
    def head(self, **attrs: Any): ...
    def tail(self): ...
    def label(self, obj: Any): ...
    def node(self, obj: Any, **attrs: Any): ...
    def terminal_node(self, obj: Any, **attrs: Any): ...
    def edge(self, a: Any, b: Any, **attrs: Any): ...
    def FMT(self, fmt: Any, *args: Any, **kwargs: Any): ...
    def draw_edge(self, a: Any, b: Any, scheme: Optional[Any] = ..., attrs: Optional[Any] = ...): ...
    def draw_node(self, obj: Any, scheme: Optional[Any] = ..., attrs: Optional[Any] = ...): ...
