Skip to content

Commit 400f6f6

Browse files
fix pre-commit
1 parent 0be8765 commit 400f6f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hypernetx/drawing/util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ def get_set_layering(H, collapse=True):
194194

195195
return levels
196196

197+
197198
def layout_with_radius(B, node_and_edge_radius=1, **kwargs):
198199
"""
199200
Convenience function allowing the user to specify ideal radii for nodes and edges in the drawing
@@ -217,17 +218,16 @@ def layout_with_radius(B, node_and_edge_radius=1, **kwargs):
217218
dict
218219
mapping of node and edge positions to R^2
219220
"""
220-
221+
221222
# get radii encodings and convert to dictionary
222223
radius_dict = dict(zip(B, inflate(B, node_and_edge_radius)))
223-
224+
224225
# edges weights are the sum of the radii of the edge endpoints
225226
for u, v, d in B.edges(data=True):
226-
d['weight'] = radius_dict.get(u, 0) + radius_dict.get(v, 0)
227-
227+
d["weight"] = radius_dict.get(u, 0) + radius_dict.get(v, 0)
228+
228229
# compute all pairs shortest path (APSP)
229230
dist = dict(nx.all_pairs_dijkstra_path_length(B))
230231

231232
# compute and return layout using above APSP; pass through arguments
232233
return nx.kamada_kawai_layout(B, dist=dist, **kwargs)
233-

0 commit comments

Comments
 (0)