summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2009-04-14 09:35:58 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2009-04-14 09:35:58 +0200
commitbee8f47ed47a7b071f3c2b41e46856ab1cffe181 (patch)
treeb14b332b1a3c065c3d0087a267baca5b70e7c911
parent927b5f276b0e9096dcba3d5848408add53783158 (diff)
downloadlogilab-common-bee8f47ed47a7b071f3c2b41e46856ab1cffe181.tar.gz
have a link to graphviz.org in docstring
-rw-r--r--graph.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/graph.py b/graph.py
index e4f3c65..097f503 100644
--- a/graph.py
+++ b/graph.py
@@ -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)))