Skip to content

Instantly share code, notes, and snippets.

@domitry
Created March 19, 2018 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domitry/7aa70a1ebab06d183fbaa45cd1cbe255 to your computer and use it in GitHub Desktop.
Save domitry/7aa70a1ebab06d183fbaa45cd1cbe255 to your computer and use it in GitHub Desktop.
diff --git a/graphspace_python/graphs/classes/gsgraph.py b/graphspace_python/graphs/classes/gsgraph.py
index abf024c..790f3ab 100644
--- a/graphspace_python/graphs/classes/gsgraph.py
+++ b/graphspace_python/graphs/classes/gsgraph.py
@@ -470,7 +470,7 @@ class GSGraph(nx.DiGraph):
attr_dict.update({"source": source, "target": target})
GSGraph.validate_edge_data_properties(data_properties=attr_dict, nodes_list=self.nodes())
- super(GSGraph, self).add_edge(source, target, attr_dict)
+ super(GSGraph, self).add_edge(source, target, **attr_dict)
def add_node(self, node_name, attr_dict=None, parent=None, label=None, popup=None, k=None, **attr):
"""Add a node to the graph.
@@ -520,7 +520,7 @@ class GSGraph(nx.DiGraph):
attr_dict.update({"name": node_name, "id": node_name})
GSGraph.validate_node_data_properties(data_properties=attr_dict, nodes_list=self.nodes())
- super(GSGraph, self).add_node(node_name, attr_dict)
+ super(GSGraph, self).add_node(node_name, **attr_dict)
def add_node_style(self, node_name, attr_dict=None, content=None, shape='ellipse', color='#FFFFFF', height=None,
width=None, bubble=None, valign='center', halign='center', style="solid",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment