"""Type stubs for the Rust-compiled _networkxr extension module."""

from typing import Any

class NodeView:
    items: list[Any]
    pos: int
    def __iter__(self) -> NodeView: ...
    def __next__(self) -> Any: ...
    def __len__(self) -> int: ...
    def __contains__(self, item: Any) -> bool: ...
    def __repr__(self) -> str: ...
    def __eq__(self, other: Any) -> bool: ...

class EdgeView:
    items: list[Any]
    pos: int
    def __iter__(self) -> EdgeView: ...
    def __next__(self) -> Any: ...
    def __len__(self) -> int: ...
    def __contains__(self, item: Any) -> bool: ...
    def __repr__(self) -> str: ...

class DegreeView:
    items: list[Any]
    pos: int
    def __iter__(self) -> DegreeView: ...
    def __next__(self) -> Any: ...
    def __len__(self) -> int: ...
    def __repr__(self) -> str: ...

class Graph:
    def __init__(
        self,
        incoming_graph_data: Any | None = None,
        **attr: Any,
    ) -> None: ...
    def add_node(self, node_for_adding: Any, **attr: Any) -> None: ...
    def add_nodes_from(self, nodes: Any, **attr: Any) -> None: ...
    def remove_node(self, n: Any) -> None: ...
    def add_edge(self, u_of_edge: Any, v_of_edge: Any, **attr: Any) -> None: ...
    def add_edges_from(self, ebunch: Any, **attr: Any) -> None: ...
    def add_weighted_edges_from(self, ebunch: Any, weight: str = "weight") -> None: ...
    def remove_edge(self, u: Any, v: Any) -> None: ...
    def has_node(self, n: Any) -> bool: ...
    def has_edge(self, u: Any, v: Any) -> bool: ...
    def neighbors(self, n: Any) -> list[Any]: ...
    def get_edge_data(self, u: Any, v: Any, default: Any = None) -> Any: ...
    def nodes(self, data: bool = False) -> NodeView: ...
    def edges(self, data: bool = False, default: Any = None) -> EdgeView: ...
    def degree(self, nbunch: Any | None = None) -> Any: ...
    def adjacency(self) -> list[Any]: ...
    def number_of_nodes(self) -> int: ...
    def order(self) -> int: ...
    def number_of_edges(self) -> int: ...
    def size(self, weight: str | None = None) -> Any: ...
    def copy(self) -> Graph: ...
    def clear(self) -> None: ...
    def clear_edges(self) -> None: ...
    def is_multigraph(self) -> bool: ...
    def is_directed(self) -> bool: ...
    def subgraph(self, nodes: Any) -> Graph: ...
    def to_undirected(self) -> Graph: ...
    def nbunch_iter(self, nbunch: Any | None = None) -> list[Any]: ...
    @property
    def name(self) -> Any: ...
    @name.setter
    def name(self, val: Any) -> None: ...
    def __contains__(self, n: Any) -> bool: ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Any: ...
    def __getitem__(self, n: Any) -> Any: ...

class DiGraph:
    def __init__(
        self,
        incoming_graph_data: Any | None = None,
        **attr: Any,
    ) -> None: ...
    def add_node(self, node_for_adding: Any, **attr: Any) -> None: ...
    def add_nodes_from(self, nodes: Any, **attr: Any) -> None: ...
    def remove_node(self, n: Any) -> None: ...
    def add_edge(self, u_of_edge: Any, v_of_edge: Any, **attr: Any) -> None: ...
    def add_edges_from(self, ebunch: Any, **attr: Any) -> None: ...
    def add_weighted_edges_from(self, ebunch: Any, weight: str = "weight") -> None: ...
    def remove_edge(self, u: Any, v: Any) -> None: ...
    def has_node(self, n: Any) -> bool: ...
    def has_edge(self, u: Any, v: Any) -> bool: ...
    def neighbors(self, n: Any) -> list[Any]: ...
    def successors(self, n: Any) -> list[Any]: ...
    def predecessors(self, n: Any) -> list[Any]: ...
    def get_edge_data(self, u: Any, v: Any, default: Any = None) -> Any: ...
    def nodes(self, data: bool = False) -> NodeView: ...
    def edges(self, data: bool = False, default: Any = None) -> EdgeView: ...
    def degree(self, nbunch: Any | None = None) -> Any: ...
    def in_degree(self, nbunch: Any | None = None) -> Any: ...
    def out_degree(self, nbunch: Any | None = None) -> Any: ...
    def adjacency(self) -> list[Any]: ...
    def number_of_nodes(self) -> int: ...
    def order(self) -> int: ...
    def number_of_edges(self) -> int: ...
    def size(self, weight: str | None = None) -> Any: ...
    def copy(self) -> DiGraph: ...
    def clear(self) -> None: ...
    def clear_edges(self) -> None: ...
    def is_multigraph(self) -> bool: ...
    def is_directed(self) -> bool: ...
    def reverse(self, copy: bool = True) -> DiGraph: ...
    def to_undirected(self) -> Graph: ...
    def subgraph(self, nodes: Any) -> DiGraph: ...
    def nbunch_iter(self, nbunch: Any | None = None) -> list[Any]: ...
    @property
    def name(self) -> Any: ...
    @name.setter
    def name(self, val: Any) -> None: ...
    def __contains__(self, n: Any) -> bool: ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Any: ...
    def __getitem__(self, n: Any) -> Any: ...
