提交 6f969dcc authored 作者: Thomas Mesnard's avatar Thomas Mesnard

pep8 on printing.py

上级 98b8d9b7
...@@ -464,7 +464,8 @@ class PPrinter: ...@@ -464,7 +464,8 @@ class PPrinter:
inv_updates = dict((b, a) for (a, b) in updates.iteritems()) inv_updates = dict((b, a) for (a, b) in updates.iteritems())
i = 1 i = 1
for node in gof.graph.io_toposort(list(inputs) + updates.keys(), for node in gof.graph.io_toposort(list(inputs) + updates.keys(),
list(outputs) + updates.values()): list(outputs) +
updates.values()):
for output in node.outputs: for output in node.outputs:
if output in inv_updates: if output in inv_updates:
name = str(inv_updates[output]) name = str(inv_updates[output])
...@@ -954,8 +955,9 @@ def pydotprint_variables(vars, ...@@ -954,8 +955,9 @@ def pydotprint_variables(vars,
try: try:
import pydot as pd import pydot as pd
except ImportError: except ImportError:
print ("Failed to import pydot. You must install pydot for " str = ("Failed to import pydot. You must install pydot for " +
"`pydotprint_variables` to work.") "`pydotprint_variables` to work.")
print str
return return
g = pd.Dot() g = pd.Dot()
my_list = {} my_list = {}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论