Skip to content

Commit 70cddc9

Browse files
authored
Update type hint in Graph.__init__
A type hint for edges parameter in Graph constructor was wrong, as it has to be a List of Lists. The current List of Sets would fail on the attempts to subscript the Set members.
1 parent b6664b1 commit 70cddc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pathfinding/core/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class Graph:
66
def __init__(
7-
self, edges: List[Set] = None, nodes: Dict[int, GraphNode] = None,
7+
self, edges: List[List] = None, nodes: Dict[int, GraphNode] = None,
88
bi_directional: bool = False):
99
# edges defined by node-from, node-to and its cost
1010
self.edges = edges if edges else []

0 commit comments

Comments
 (0)