From 4ca85f416788c5d4962e6efcf5bd2f35a6f85fec Mon Sep 17 00:00:00 2001 From: Gregory Brodsky Date: Sun, 21 Nov 2021 12:48:29 +0200 Subject: [PATCH] Issue #165: rename G.node into G.nodes --- .gitignore | 2 ++ smop/resolve.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 20fa5360..75ada38e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ parsetab.py dist/ build/ runtime/ +.gitconfig +.idea/ diff --git a/smop/resolve.py b/smop/resolve.py index 1e4b16f6..0bbc5fe2 100644 --- a/smop/resolve.py +++ b/smop/resolve.py @@ -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): @@ -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):