Skip to content

Commit 9857297

Browse files
committed
Merge branch 'raise-error-not-string' of https://github.com/caedenph/python into raise-error-not-string
2 parents 982f458 + 5d0cafa commit 9857297

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphs/breadth_first_search_shortest_path.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def shortest_path(self, target_vertex: str) -> str:
7373

7474
target_vertex_parent = self.parent.get(target_vertex)
7575
if target_vertex_parent is None:
76-
raise ValueError(f"No path from vertex: {self.source_vertex} to vertex: {target_vertex}")
76+
raise ValueError(
77+
f"No path from vertex: {self.source_vertex} to vertex: {target_vertex}"
78+
)
7779

7880
return self.shortest_path(target_vertex_parent) + f"->{target_vertex}"
7981

0 commit comments

Comments
 (0)