Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions odo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ def path(graph, source, target, excluded_edges=None, ooc_types=ooc_types):
if issubclass(n, oocs)])
with without_edges(graph, excluded_edges) as g:
pth = nx.shortest_path(g, source=source, target=target, weight='cost')
edge = graph.edge

def path_part(src, tgt):
node = edge[src][tgt]
#node = edge[src][tgt]
node = graph[src][tgt]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the comments? A git blame on github should suffice in referencing the change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is done.

return PathPart(src, tgt, node['func'], node['cost'])

return map(path_part, pth, pth[1:])
Expand All @@ -189,7 +189,7 @@ def without_edges(g, edges):
edges = edges or []
held = dict()
for a, b in edges:
held[(a, b)] = g.edge[a][b]
held[(a, b)] = g[a][b]
g.remove_edge(a, b)

try:
Expand Down