diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2009-04-14 09:35:58 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2009-04-14 09:35:58 +0200 |
commit | bee8f47ed47a7b071f3c2b41e46856ab1cffe181 (patch) | |
tree | b14b332b1a3c065c3d0087a267baca5b70e7c911 | |
parent | 927b5f276b0e9096dcba3d5848408add53783158 (diff) | |
download | logilab-common-bee8f47ed47a7b071f3c2b41e46856ab1cffe181.tar.gz |
have a link to graphviz.org in docstring
-rw-r--r-- | graph.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -99,15 +99,17 @@ class DotBackend: self.lines.append(line) def emit_edge(self, name1, name2, **props): - """emit an edge from <name1> to <name2>.""" - #edge properties: see http://www.graphviz.org/doc/info/attrs.html + """emit an edge from <name1> to <name2>. + edge properties: see http://www.graphviz.org/doc/info/attrs.html + """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] n_from, n_to = normalize_node_id(name1), normalize_node_id(name2) self.emit('%s -> %s [%s];' % (n_from, n_to, ", ".join(attrs)) ) def emit_node(self, name, **props): - """emit a node with given properties""" - # node properties: see http://www.graphviz.org/doc/info/attrs.html + """emit a node with given properties. + node properties: see http://www.graphviz.org/doc/info/attrs.html + """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] self.emit('%s [%s];' % (normalize_node_id(name), ", ".join(attrs))) |