From 70cddc9ff2a9e7648515cae786b1c80624f698fe Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 29 Oct 2025 10:38:34 +0100 Subject: [PATCH] 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. --- pathfinding/core/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathfinding/core/graph.py b/pathfinding/core/graph.py index 1226edd..0acf95a 100644 --- a/pathfinding/core/graph.py +++ b/pathfinding/core/graph.py @@ -4,7 +4,7 @@ class Graph: def __init__( - self, edges: List[Set] = None, nodes: Dict[int, GraphNode] = None, + self, edges: List[List] = None, nodes: Dict[int, GraphNode] = None, bi_directional: bool = False): # edges defined by node-from, node-to and its cost self.edges = edges if edges else []