Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions stubs/networkx/networkx/generators/interval_graph.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from _typeshed import Incomplete
from collections.abc import Iterable
from collections.abc import Iterable, Sequence
from typing import TypeVar

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

__all__ = ["interval_graph"]

_T = TypeVar("_T")

@_dispatchable
def interval_graph(intervals: Iterable[Incomplete]) -> Graph[Incomplete]: ...
def interval_graph(intervals: Iterable[Sequence[_T]]) -> Graph[tuple[_T, ...]]: ...
4 changes: 2 additions & 2 deletions stubs/networkx/networkx/generators/lattice.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def triangular_lattice_graph(
periodic: bool = False,
with_positions: bool = True,
create_using: Graph[Incomplete] | type[Graph[Incomplete]] | None = None,
) -> Graph[Incomplete]: ...
) -> Graph[tuple[int, int]]: ...
@_dispatchable
def hexagonal_lattice_graph(
m: int,
n: int,
periodic: bool = False,
with_positions: bool = True,
create_using: Graph[Incomplete] | type[Graph[Incomplete]] | None = None,
) -> Graph[Incomplete]: ...
) -> Graph[tuple[int, int]]: ...
Loading