Skip to content

Commit a5a1f38

Browse files
committed
Add type hint to Graph.remove_pair
1 parent 5835a46 commit a5a1f38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

graphs/directed_and_undirected_weighted_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ def add_pair(self, u, v, w=1) -> None:
314314
self.graph[v] = [[w, u]]
315315

316316
# handles if the input does not exist
317-
def remove_pair(self, u, v):
317+
def remove_pair(self, u, v) -> None:
318318
"""
319319
Removes the edge between u and v in an unidirected graph, if it exists
320-
320+
321321
>>> g = Graph()
322322
>>> g.add_pair(1,2)
323323
>>> g.add_pair(1,3,5)

0 commit comments

Comments
 (0)