Skip to content

Commit 39fdc02

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f9bf655 commit 39fdc02

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

graphs/johnson_graph.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ def johnson_algo(self) -> list[dict]:
9090
vertex_b,
9191
weight + hash_path[vertex_a] - hash_path[vertex_b],
9292
)
93-
self.edges[i] = (vertex_a,
94-
vertex_b,
95-
weight + hash_path[vertex_a] - hash_path[vertex_b])
93+
self.edges[i] = (
94+
vertex_a,
95+
vertex_b,
96+
weight + hash_path[vertex_a] - hash_path[vertex_b],
97+
)
9698

9799
self.graph.pop("#")
98100
self.edges = [
@@ -118,7 +120,7 @@ def johnson_algo(self) -> list[dict]:
118120
if vertex1 == vertex:
119121
filtered_neighbors.append((vertex2, node_weight))
120122
self.graph[vertex] = filtered_neighbors
121-
123+
122124
distances = []
123125
for vertex1 in self.graph:
124126
new_dist = self.dijkstra(vertex1)

0 commit comments

Comments
 (0)