add stubs for networx.has_path (#12252)

This commit is contained in:
Benjamin Kirkbride
2024-07-02 04:14:56 -04:00
committed by GitHub
parent 5bf3f47496
commit d498fe148e

View File

@@ -6,7 +6,7 @@ from networkx.classes.graph import Graph, _Node
from networkx.utils.backends import _dispatch
@_dispatch
def has_path(G, source, target): ...
def has_path(G: Graph[_Node], source: _Node, target: _Node) -> bool: ...
@overload
def shortest_path(
G: Graph[_Node], source: _Node, target: _Node, weight: Incomplete | None = None, method: str = "dijkstra"