Skip to content
Merged
Changes from all 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
20 changes: 11 additions & 9 deletions stubs/networkx/networkx/drawing/nx_pydot.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
from _typeshed import Incomplete
from _typeshed import SupportsRead, SupportsWrite
from os import PathLike
from typing import Any

from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatchable

from ..classes.graph import Graph
from pydot import Dot # type: ignore[import-not-found] # pyright: ignore[reportMissingImports]

__all__ = ["write_dot", "read_dot", "graphviz_layout", "pydot_layout", "to_pydot", "from_pydot"]

def write_dot(G, path) -> None: ...
def write_dot(G: Graph[_Node], path: str | PathLike[Any] | SupportsWrite[str]) -> None: ...
@_dispatchable
def read_dot(path) -> Graph[Incomplete]: ...
def read_dot(path: str | PathLike[Any] | SupportsRead[str]) -> Graph[str]: ...
@_dispatchable
def from_pydot(P): ...
def to_pydot(N): ...
def graphviz_layout(G, prog: str = "neato", root=None): ...
def pydot_layout(G, prog: str = "neato", root=None): ...
def from_pydot(P: Dot): ...
def to_pydot(N: Graph[_Node]) -> Dot: ...
def graphviz_layout(G: Graph[_Node], prog: str = "neato", root: _Node | None = None): ...
def pydot_layout(G: Graph[_Node], prog: str = "neato", root: _Node | None = None): ...
Loading