Skip to content

Commit

Permalink
Issue victorlei#165: rename G.node into G.nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bst-gbr committed Nov 21, 2021
1 parent bdad96b commit 4ca85f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ parsetab.py
dist/
build/
runtime/
.gitconfig
.idea/
4 changes: 2 additions & 2 deletions smop/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def resolve(t, symtab=None, fp=None, func_name=None):
G = as_networkx(t)
for n in G.nodes():
print(n.__class__.__name__)
u = G.node[n]["ident"]
u = G.nodes[n]["ident"]
if u.props:
pass
elif G.out_edges(n) and G.in_edges(n):
Expand All @@ -63,7 +63,7 @@ def resolve(t, symtab=None, fp=None, func_name=None):
u.props = "R" # ref
else:
u.props = "F" # ???
G.node[n]["label"] = "%s\\n%s" % (n, u.props)
G.nodes[n]["label"] = "%s\\n%s" % (n, u.props)
return G

def do_resolve(t,symtab):
Expand Down

0 comments on commit 4ca85f4

Please sign in to comment.