diff --git a/rustworkx/__init__.py b/rustworkx/__init__.py index 5e6f18c02..48f65fde0 100644 --- a/rustworkx/__init__.py +++ b/rustworkx/__init__.py @@ -488,14 +488,8 @@ def has_path( raise TypeError("Invalid Input Type %s for graph" % type(graph)) -@has_path.register(PyDiGraph) -def _digraph_has_path(graph, source, target, as_undirected=False): - return digraph_has_path(graph, source, target=target, as_undirected=as_undirected) - - -@has_path.register(PyGraph) -def _graph_has_path(graph, source, target): - return graph_has_path(graph, source, target=target) +has_path.register(PyDiGraph, digraph_has_path) +has_path.register(PyGraph, graph_has_path) @functools.singledispatch