Commits

Kevin Hunter committed b40c43e Draft

Follow PEP 8 recommendation on line continuation

http://www.python.org/dev/peps/pep-0008/#maximum-line-length

Comments (0)

Files changed (1)

sphinx/ext/graphviz.py

 
     def run(self):
         node = graphviz()
-        node['code'] = '%s %s {\n%s\n}\n' % \
-                       (self.name, self.arguments[0], '\n'.join(self.content))
+        node['code'] = ('%s %s {\n%s\n}\n' %
+                       (self.name, self.arguments[0], '\n'.join(self.content)))
         node['options'] = []
         for i in ('align', 'alt', 'caption'):
             if i in self.options:
 
 def render_dot(self, code, options, format, prefix='graphviz'):
     """Render graphviz code into a PNG or PDF output file."""
-    hashkey = (code + str(options) + \
-              str(self.builder.config.graphviz_dot) + \
+    hashkey = (code + str(options) +
+              str(self.builder.config.graphviz_dot) +
               str(self.builder.config.graphviz_dot_args)
               ).encode('utf-8')
 
     if path.isfile(outfn):
         return relfn, outfn
 
-    if hasattr(self.builder, '_graphviz_warned_dot') or \
-       hasattr(self.builder, '_graphviz_warned_ps2pdf'):
+    if (hasattr(self.builder, '_graphviz_warned_dot') or
+       hasattr(self.builder, '_graphviz_warned_ps2pdf')):
         return None, None
 
     ensuredir(path.dirname(outfn))